Language server for snippets in Helix
This package allows you to add snippets to the Helix editor using a LSP server for autocompleting snippets.
You can define your snippets in a TOML file and use it in Helix.
npm i -g helix-snippets-ls
Create an snippets.toml file inside your Helix config dir ~/.config/helix/snippets.toml
The snippets follow the VSCode snippets standard. Add snippets inside it like:
li = "<li>0ドル</li>" img = "<img src=\"1ドル\" alt=\"2ドル\" />" inbx = "<AppInbox abc=\"1ドル\" xyz=\"2ドル\">0ドル</AppInbox>" # Multiline snippets for = """for await (const ${1:iterator} of ${2:object}) { \t0ドル }""" sim = "setImmediate(() => {\n\t${0}\n})"
Config your languages.toml to use this Language server
[[language]] name = "handlebars" roots = ["package.json"] file-types = ["hbs"] scope = "source.hbs" language-server = { command = "helix-snippets-ls" }
- The language server can be only used for one language at a time