Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rajasegar/helix-snippets-ls

Repository files navigation

helix-snippets-ls

npm version

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.

helix snippets demo

Install

npm i -g helix-snippets-ls

Usage

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

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" } 

Known limitations

  • The language server can be only used for one language at a time

About

Helix Snippets Language Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /