Code Editor Improvements

The Crayta editor is cool in that it supports collaborative editing and such. However it misses many features that have become the norm in IDEs. For example:

  • Ctrl+click to go to declarations of functions / variables or see usages of a function / variable
  • Forward / back navigation
  • Inspection of code, including EmmyDoc annotations, to provide static analysis (like Luanalysis)
  • Global search

Of course implementing all those features yourselves would not be feasible or maintainable. However, there might be a relatively easy and maintainable solution: Visual Studio Code is a completely open source IDE that runs through a client/server model. It is written in TypeScript, and the client component can even be compiled to run in a browser. In combination with a Lua plugin for VS Code it would pretty much provide all the features we want. It also supports collaborative programming through Live share, although that is currently a separate service, so the collaborative editing part may need to be implemented through an extension.

The Server component could run alongside (or integrated into) Crayta’s game server. I think it should be possible to render the Client client component using Coherent Gameface. You’d want to strip down VS Code to just it’s code editor view, and fortunately that doesn’t seem too hard either.


IMO an even neater alternative would be to to allow pulling packages directly from GitHub repositories (or any Git remote, for that matter). That way folks can use whatever editor they like, and all the in-game UI needs is a way to pull changes from the git remote.

Then you not only outsource this problem of editors, but also make it easier to generate content externally, which is a lot easier than copy/pasting giant blobs of LUA code.