glint icon indicating copy to clipboard operation
glint copied to clipboard

How to use `glint-language-server`

Open c0rydoras opened this issue 2 years ago • 3 comments

Hello,

I need some help with using the language server, the glint-language-server binary does not appear to be doing anything, no output etc. Unfortunately, I couldn't locate any relevant documentation/usage on how to utilize it. I would greatly appreciate any help. Thank you.

c0rydoras avatar Jul 04 '23 15:07 c0rydoras

Glint's language server implements the standard language server protocol, though if you aren't building a custom editor integration you probably don't need to interact with it directly. And if you are building a custom editor integration, most modern editors these days have a framework for integrating LSP implementations, so you hopefully shouldn't need to worry too much about the details of the protocol.

dfreeman avatar Jul 04 '23 20:07 dfreeman

I want to integrate it into helix

[language-server.glimmer]
command = "glint-language-server"

c0rydoras avatar Jul 05 '23 07:07 c0rydoras

You can also look at https://github.com/patricklx/intellij-emberjs-experimental and https://github.com/typed-ember/glint/tree/main/packages/vscode, which use standard LSP clients for IntelliJ and VSCode respectively, for examples of existing consumers of the language server.

Since every editor is going to have a different way of communicating with language servers, though, the best I can recommend is looking at Helix's own documentation to see how they want you to integrate it.

dfreeman avatar Jul 05 '23 11:07 dfreeman