-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup with rust and leptos? #42
Comments
What I believe youre asking for is Embedded/Injected Languages. It looks like tree-sitter has support but that doesn't look like it extends to language servers. There seems to be other people wondering the same (albeit for different languages), but the current stance of neovim seems to be "no". I'm not sure if this is possible at the lsp level (unless |
They way I understand it, the language server protocol would ideally have some built-in way of doing it, but this isn't the world we live in. There were a few issues open on the LSP spec repo requesting embedded language support on the protocol level. They all got closed with a proposed plan, but the PR that apparently was supposed to be the first step towards something better than the status quo has been untouched for 3 years now. (The protocol now has "notebook document" support (for Jupyter, I suppose). It might be the case that a host language server could (a)buse this to support foreign language embedding, but I'm not familiar enough with the inner working of language servers to tell either way.) The other editor-agnostic way of doing it is having the host language's language server support this kind of embedding by invoking other language servers itself, though I'm not sure there's any language server currently implementing a generic mechanism for this. There is a feature request for something like this in rust-analyzer, but I don't think that's going anywhere any time soon given the "hard" and "unactionable" labels on the issue. |
I'm not entirely sure if this is the proper way to ask for it, but I was wondering if there is a way to setup this lsp in a way that recognizes when I'm in a rust file that has leptos templates, and when it occurs, enable htmx lsp?
The text was updated successfully, but these errors were encountered: