/hw

The Hollywood Code Editor is a lightweight extensible code editor targeting the Lua programming language.

Primary LanguageSCSSGNU Affero General Public License v3.0AGPL-3.0

The Hollywood Code Editor (hw for short) is a lightweight extensible code editor targeting the Lua programming language. Built around monaco-editor-core and sumneko's lua-language-server, its flexible component-based design allows anybody to integrate the Hollywood Code Editor into their development toolchain with the features that are relevant to them. It is also customizable in pretty much every foreseeable way, offering a beautiful design language modeled after Fluent UI.

The Hollywood Code Editor does not directly include any facilities that permits the execution of Lua code, as to let users implement their own interfaces to the Lua distribution of their choice. This can be done by writing a plugin module that can then be consumed by the interface to implement execution behavior, which requires minimal effort.

NOTE: As of February 1, 2022, this repository only contains the cosmetic assets of the code editor, such as the stylesheets, logos and associated resources. The source code will be made available when the application enters public beta somewhen this year.

End-user feature overview

  • The Hollywood Code Editor offers a comfortable and familiar programming environment that does not sacrifice functionality or good looks. It tries to blend the perfect lightweightedness of the Lua programming experience with the intelligence and performance of modern linters, language servers and IDEs. With an interface modeled after the vscode layout but adapted to the simplicity of Lua scripting, old school developers and student programmers alike will both find the code editor simple, comfortable yet powerful.
  • Our full Lua editor stack features support for the Language Server Protocol using JSON-RPC over sockets. Our interface includes monaco-editor-core, the core and central component of Visual Studio Code's powerful text editor that we wired to monaco-languageclient, a complete and easy-to-use LSP client, alongside our own extensions to either package. Included with Hollywood is a distribution of lsp-ws-proxy that allows you to proxify stdio-oriented language servers to websockets, guaranteeing our stack's full support for most language servers.
  • A relatively simple package and repository system that allows developers to include third-party Lua code into their projects without having to use specialized Lua runtimes or library extensions. The packaging, depackaging and sewing-up of files is done entirely by Hollywood.
  • Versatile theming built using Sass. Hollywood uses a fully original set of stylesheets inspired by Fluent UI written in sass, an extension of the CSS language that makes styling convenient. As the Sass compiler is packed with Hollywood and tied to our in-house theming engine, you do not have to precompile any sass to css before distribution - you can distribute Sass stylesheets directly within your theme!

Developer feature overview

  • Our codebase is built for performance and ease-of-use. With many internal services using a component-based system for extending functionality, it is very easy to extend the editor's complicated codebase without hardcoding new features in.
  • Third-party tool use using our Powertools engine. Hollywood has built-in infrastructure to make use of third party tools ("Powertools") coded for different ecosystems, such as code formatters. Their installation and use is fully managed by Hollywood and within its interface, meaning you do not ever have to browse a repository or a third party website to install a power tool, you can do so directly from the UI.

Installation

Development and installation requires nodejs v14 and above alongside Build Tools for Visual Studio (2019 and above). There is no need to install Visual Studio in its entirety - only the commandline build tools offered on that page.

  • You can download nodejs v14 and above here. Newer is better unless indicated otherwise on this readme, or enforced programmatically in package.json. Either way, you will get a nice error if there is cause.
  • You can download Build Tools for Visual Studio (2019 and above) here. As mentioned above, you do not have to install Visual Studio itself, only the build tools found at the bottom of the page.

Before building the Hollywood code editor, you must install all dependencies using npm i in a terminal pointing to the root directory. After that, simply run npm run autodev in a terminal and press F5 in VSCode to run and debug the interface. If the postinstall script wasn't ran for some reason, you can run npm run build-init to initiate the Hollywood build environment and execute the first build. If you aren't using VSCode, you can always use client-start to run the client (or client-start-debug to run the client in debug mode).

You do not need to run any special commands when using autodev to compile any project code (including SCSS styling). Just write, save and smash the F5 key to run the app. However, if you're making changes to any other files, you will have to run build-app to recompile the client.

Packaging

To package the Hollywood code editor for distribution, you can use the command npm run package. This will output Windows binaries using electron-forge that can be archived and sent to people. You can configure packaging options in package.json.

Notes

  • The Hollywood Code Editor is for standalone desktop distribution only and is unlikely to work in a browser environment. Considering the weight of the editor, we wouldn't recommend trying to adapt it (or any of its components) for a browser environment anyway. If you want to include the base editor used by Hollywood, we suggest you take a look at monaco-editor, which supports far more languages than Hollywood's distribution that only supports Lua.
  • Hollywood automatically applies a number of rudimentary patches to JavaScript's module import system that may break the code editor if the project is bundled with Webpack or other similar solutions. Theses patches are to resolve incompatibilities between packages used by the Hollywood code editor.

Licensing

The Hollywood Code Editor is licensed under the GNU Affero General Public License Version 3. The Hollywood Code Editor is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The Hollywood Code Editor is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU Affero General Public License Version 3 for more details.