Aesophia-vscode, a Sophia VSCode extension with basic LSP implementation

Hi!

I’ve uploaded a Visual Studio Code extension for Sophia, aesophia-vscode, version 0.1.1

Still in its infancy, hopefully usable.

The parser is not complete yet, but it handles all_syntax.aes reasonably well.
Barebones completion for stdlib-includes and namespaces, see example below.

Source

  • aesophia-parser Sophia parser implemented in TypeScript.
  • aesophia-vscode VSCode plugin

/Nicklas

For aesophia-vscode source - See https://github.com/ybin64/aesophia-vscode

example

10 Likes

This is great brother

Looking forward to to finished project

Nice! Looking forward to seeing how this will evolve :slight_smile:

P.S. Thanks for the attribution :v:

Hi,
I am having a pleasure of testing out that extension for some serious purpose. The project looks very promising and I would love to see it running.

I know the project is quite young, but here is my feedback for now:

  • List comprehensions are not supported :frowning:
  • I am impatiently waiting for the typechecker support – this however needs to be hacked out somehow. Maybe one could support it optionally using compiler’s CLI?
  • Autoformat feature would be a God sent
  • The coloring is not always accurate. Especially it is completely insensitive on custom defined types. This however is going to be a bit tricky task. What could be fixed there are the function closure blocks
2 Likes

Hi,

Thanks for the kind words.

  1. List comprehension will be there, but you’ll have to wait a couple of weeks.
  2. Type checker will be there eventually, but a full-blown implementation is probably far away.
    I was thinking of starting with a smaller scope. If you have an example of your typical issues I’ll try to prioritize them.
  3. Hadn’t thought about implementing autoformat, but I’ll put it on the todo-list, Is there some sort of concensus on the format?
  4. Currently the syntax-coloring isn’t based on the sophia-parser, which I believe would be the “correct solution”. I haven’t looked into how to implement that though.
    If you have a working solution for the function closure blocks, let me now.

/N

1 Like
  1. <3
  2. At least undefined variable errors would be nice for a start
  3. aesophia has some pretty-printing stuff. Maybe you should check it out?
  4. I think the parser is aware whether it parses a expr-variable or a typevar? Maybe it is just a matter of retokenization (something like pretty printing but into tokens)
2 Likes