How to create add Go HTML templates to LSP? #10665
-
Helix's LSP has a general purpose
How do I achieve that?This is what I tried without success: [[language]]
name = 'gohtml'
scope = 'text.html.basic'
injection-regex = 'html'
auto-format = true
language-servers = ['vscode-html-language-server', 'gopls']
file-types = ['gohtml'] |
Beta Was this translation helpful? Give feedback.
Answered by
alexeypegov
Oct 22, 2024
Replies: 1 comment 3 replies
-
You can try something like this, it should give you highlighting and lsp support for both in your languages.toml: [[language]]
name = "gotmpl"
file-types = ["gohtml"]
language-servers = ["gopls", "vscode-html-language-server"] And then in ~/.config/helix/runtime/queries/gotmpl/injections.scm: ((text) @injection.content
(#set! injection.language "html")
(#set! injection.combined)) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
andradei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can try something like this, it should give you highlighting and lsp support for both
gotmpl
andhtml
:in your languages.toml:
And then in ~/.config/helix/runtime/queries/gotmpl/injections.scm:
((text) @injection.content (#set! injection.language "html") (#set! injection.combined))