Replies: 5 comments 1 reply
-
You're probably looking for #395 which also suggests a snippets manager within Helix. |
Beta Was this translation helpful? Give feedback.
-
how do you jump between placeholders while in snippet? @dcompoze |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@dcompoze so you mean that you put this in the config of a separate lsp that provides the snippets, is my understanding correct? Curious: which snippet lsp do you use? |
Beta Was this translation helpful? Give feedback.
-
hx-lsp support vscode snippets. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm able to define LSP snippets inside of a
languages.toml
file like so:This makes the snippet show up as part of auto-completion in the editor.
However, it's quite cumbersome to maintain a large list of snippets inside of a single
languages.toml
configuration file, especially when the snippets are large (e.g. lots of boilerplate for HTML).VSCode has a way of loading snippets from
~/.config/VSCode/User/snippets/*.json
but I'm not aware of Helix doing anything similar.Also, to my understanding, most language servers don't provide a way to independently load global configuration outside of the editor (e.g. something like
~/.rust-analyzer/snippets.json
), since the LSP client is supposed to load and provide the configuration to the language server, including any custom snippets.Hence, the only option seems to be to use the
languages.toml
file to provide custom configuration to the language server - together with the custom snippets.Are there other ways of loading LSP snippets other than specifying them inside of the
languages.toml
file as shown above (ideally each snippet would be in a separate file)?Beta Was this translation helpful? Give feedback.
All reactions