Proper Syntax Highlighting

Hello everybody,

currently, for syntax highlighting, AE Studio uses a temporary hack that @milenradkov.chain thankfully brought up some time ago. It’s missing important type highlightings by now though, so we definitely need to update.

The bespoke library is MS’ open source monaco, which basically runs under the hood of Visual Studio Code, so it’s highly relevant and worth to stick to.

  1. Could we maintain the syntax highlighting module for that library as part of aesophia, please ? If possible, right in the repo ?

  2. Could you share some input @milenradkov.chain on what was necessary to setup that syntax highlighting module and maintain it ? Maybe @hanssv.chain would like to read along :wink:
    It should be somewhere here I guess but I can’t seem to find it… EDIT: Nevermind:

  3. Can we retry submitting it to MS again please ? IIRC the last time they said we provided “too many examples” ? :thinking:

1 Like

well this is generally a topic that needs to be covered. it would be nice to have a LSP implementation that can be consumed by different editors.

this is related to [Postponed] Language Server + VSCode Plugin for Sophia.

after submission of that proposal somebody extended Milens work, started developing a language server and published a plugin for VSCode. recently I tried to use it but I think I ran into some probems. so not sure whether is is actually usable and/or up to date. it was published in this thread: Aesophia-vscode, a Sophia VSCode extension with basic LSP implementation

maybe @ybin64 is still with us and can provide some information about it. I’d love to see that work updated and continued :slight_smile:


The js-transpiled version of aesophia has a working Sophia lexer, may be useful.


afaik regarding syntax highlighting, every IDE/library does its own thing, unfortunately.

1 Like

this is why the Language Server Protocol was created. this makes it possible to consume the logic (e.g. autocomplete, goto, …) in different IDEs in a standardized way. of course a client for each editor would be required. but the support for different IDEs could be developed quite easily on demand then.

ideally we find somebody that has already experience developing LSP and could either use the js-transpiled version of sophia or update and extend the existing implementation of @ybin64

The LSP part of the current aesophia vscode - plugin shouldn’t be that hard to re-use for a generic
nodejs-based LSP-provider that is useful for editors supporting the LSP-protocol.

But as @nikitafuchs.chain said, that won’t solve the syntax highligting, that’s editor-/ide-specific.

I’m a little busy right now, but if you can wait a little bit more I can give it a try within the next month.


cool, that would be great! happy to see some progress on that side as long it doesn’t take years :slight_smile:

yes, I missed that @nikitafuchs.chain explicitly talked about the syntax highlighting part. that’s indeed a bit unfortunate