Developing a language support extension


#1

I would like to develop a langue support extension for Elm in VS Code.

I know about https://github.com/Krzysztof-Cieslak/vscode-elm. It’s nice, I have been using it, and seen the source code too. Will possibly use that code base as a starting point. But it does not have any implementation for intellisense/autocomplete (it uses elm-oracle), and that is the part I am most interested in.

My purpose is mainly learning and later probably playing around with some visualization ideas. Of course if the experiment brings any nice results I would be happy to share it with the community.

Anyway, as a first deliverable step in that direction, I wanted to port some of the autocomplete capabilities of Elmjutsu. I spent two days going through the codebase and I came to the conclusion that first I should probably learn about autocomplete in general, and have at least a rough general idea on how this functionality is normally implemented.

Can you suggest any interesting articles or books on implementing context aware autocomplete?
(if it is specific to functional languages, that’s even better!)


Parsing, generating, evaluating Elm code
#2

Cool!
I cannot contribute knowledge but I would encourage you to see if you can build this as a language server if you can. It is becoming more and more popular in the surge of new editors as you can write it once and integrate everywhere.
It would be so cool to have features available not only in Atom and VSCode, but also in vim, sublime text, text mate and oni.

The specification lives here:
https://langserver.org/

Cheers


#3

Hello @gaborv!

I have some language server implementation going on.

The next step I wanted to take there was exactly autocompletion! However I haven’t found enough time to dive in the topic myself yet. So if you are interested in contributing, it’d be awesome!

In the long run such work might be beneficial not only to people using VSCode, but those who use other editors as well.

Feel free find me on Slack by the same nickname.


#4

Hi!

@gaborv: See https://github.com/MartinKavik/elm-helpers - I’ve just pushed it for you, it’s my experiment with VSC Elm extensions - you can use it for some inspiration / starting point (a few lines of code and screenshot in README, configured for Elm, it uses regexes instead of oracle (it will be better with lang server of course))


#5

Hello @gyzerok! (cc: @gaborv)

I don’t know how would you like to parse Elm code, but I’ve got some tips for parsers:

A) You can integrate Elm code to lang server / VSC extension:

B) You have to use Typescript / Javascript


#6

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.