Proper Syntax Highlighting

Hello everybody,

currently, for syntax highlighting, AE Studio uses a temporary hack that @bruteforce.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 @bruteforce.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 GitHub - mradkov/ngx-monaco-editor: Monaco Editor component for Angular 2 and Above but I can’t seem to find it… EDIT: Nevermind: vscode-sophia/sophia.json at master · mradkov/vscode-sophia · GitHub

  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:

5 Likes

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

2 Likes

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.

3 Likes

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

are you planning to tackle this topic again? I think every Sophia developer would welcome this :slight_smile:

edit:

  • and I personally would advertise it as much as possible :stuck_out_tongue:

what was the state of affairs with microsoft here @bruteforce.chain , would you try resubmitting again ?

do you mean this one? adding sophia language by thepiwo · Pull Request #4719 · github/linguist · GitHub