[ANN] `@rescript/language-server` and `@rescript/tools` released

Great work @KidkArolis!!!

About the second problem: the syntax partially loses highlighting as you're typing

Does the highlights come from the tree-sitter or the LSP (semantic tokens)?

Highlighting comes from the tree-sitter I believe.

To be honest - it’s all working pretty well! LSP and the highlighting. LSP does seem a bit slow, but I haven’t done much ReScript in VSCode to be able to compare the difference. You should give it a try and leave issues in the repo for anything sub-optimal you notice and we can try to improve this!

Very cool! I tried it and it seems to work partly:

  • I need to manually select the language before syntax highlighting shows up
  • The LSP works on a single file, but any file I open next it doesn’t work and the LSP seems to have died

How are you debugging this? I can see the Zed log, but not the lsp log.

You can make it open res files in ReScript lang by adding this to your config, afaik it’s a limitation in Zed now, extensions don’t get to configure this from what I’ve seen so far:

"file_types": {
  "ReScript": ["res", "resi"]
}

In terms of debugging or even compiling locally, follow the README here: GitHub - humaans/rescript-zed: ReScript support for Zed editor. You can see the LSP output by Cmd + shift + p and

debug: open language server logs

@zth sorry for hijacking this thread :pensive: Shall I create a new thread to continue the Zed chatter?

1 Like

I don’t mind, but a dedicated thread might be good for visibility, so go for it.

1 Like