The ls is an integration designed for Helix Editor, enabling the utilization of snippets from Visual Studio Code as auto-completion suggestions within the Helix Editor's Language Server Protocol (LSP) environment.
go install github.com/daxartio/snippets-ls@latest
Don't forget to append ~/go/bin
to your $PATH
.
Create your own snippets follow VSCode syntax. Alternatively, you can make use of pre-existing sample for various programming languages.
Update your configuration file located at ~/.config/helix/languages.toml
:
[[language]]
name = "go"
formatter = { command = "goimports"}
language-servers = ["gopls", "snippets-ls"]
[language-server.snippets-ls]
command = "snippets-ls"
args = ["-lang", "go"]
Subsequently, as you start working on your file, input a snippet prefix to observe the suggestion.
If it does not work, take a look at ~/.cache/helix/helix.log
for additional insights.