typed-ember / glint

TypeScript powered tooling for Glimmer templates
https://typed-ember.gitbook.io/glint
MIT License
109 stars 51 forks source link

How to use `glint-language-server` #598

Open c0rydoras opened 1 year ago

c0rydoras commented 1 year ago

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.

dfreeman commented 1 year ago

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.

c0rydoras commented 1 year ago

I want to integrate it into helix

[language-server.glimmer]
command = "glint-language-server"
dfreeman commented 1 year ago

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.