Stream: show and tell

Topic: Language server


view this post on Zulip Ayaz Hafiz (Oct 22 2023 at 17:37):

I've updated the language server binary I made more than a year ago to have support for hover, go-to-definition, and document formatting. You can check it out and get it here: https://github.com/ayazhafiz/roc/blob/lang-srv/crates/lang_srv/README.md

I've added some documentation there for how to use the binary in the editor I use (vim), but I plan to add VSCode support soon (probably tonight, or if someone wants to help out on getting that done before then, feel free!).

The language server may sometimes crash and probably won't always give you the results you want, but it might be useful if you're developing something. I used it to explore @Agus Zubiaga 's roc-pg and it wasn't too bad!

view this post on Zulip Richard Feldman (Oct 22 2023 at 17:52):

amazing, thank you so much @Ayaz Hafiz!!! If you get it working with vs code, I bet @Ivan Demchenko would be interested to know :grinning:

view this post on Zulip Richard Feldman (Oct 22 2023 at 17:52):

(he maintains the Roc vs code extension that I use)

view this post on Zulip Brendan Hansknecht (Oct 22 2023 at 18:21):

Next I just want a treesitter

view this post on Zulip Brendan Hansknecht (Oct 22 2023 at 18:22):

But yeah, thanks for the language server. Definitely used it a solid amount at various points.

view this post on Zulip Ayaz Hafiz (Oct 22 2023 at 18:27):

We don’t even need a tree sitter with semantic tokens

view this post on Zulip Ayaz Hafiz (Oct 22 2023 at 18:28):

It provides you free syntax highlighting!

view this post on Zulip Brendan Hansknecht (Oct 22 2023 at 18:30):

:joy:.....I just need to wait for helix to update to support them then.....

I think someone is currently working on it, but originally helix only supported tree sitter for perf reasons. The struggles of a new editor.

view this post on Zulip Ayaz Hafiz (Oct 23 2023 at 02:12):

@Ivan Demchenko I sent you a PR: https://github.com/raqystyle/roc-vscode-unofficial/pull/12. If anyone wants to use the VSCode integration before it's in a public plugin, you can check out that branch, do an npm install, npx vsce package, and install the extension manually.
You'll need to specify the language server binary path, which you must build with the instructions I mentioned above, in your VSCode settings.

view this post on Zulip Richard Feldman (Oct 23 2023 at 02:18):

so exciting!!!

view this post on Zulip Ivan Demchenko (Oct 23 2023 at 09:15):

@Ayaz Hafiz thank you, you're a legend! Sorry for the delay, everyone. I'll fast-track this :)

view this post on Zulip Ayaz Hafiz (Oct 23 2023 at 12:37):

Thanks! And no, no delay at all - please don't apologize. Sorry if the message came off pressure-ful or something, definitely not my intention at all


Last updated: Jul 05 2025 at 12:14 UTC