estin/simple-completion-language-server

external snippets

Opened this issue · 4 comments

I am trying to get external snippets working. When I copy the and paste the external-snippets.toml the snippets validate. Not getting any snippets when it is set in languages.toml.

Also, with the external-snippets.toml - it always looks for [sources.path] . how can you set it so it changes snippets for the language file that is open? .py - scope python - .rb -> scope ruby

You did remember to run fetch external snippets, correct?

I'm pretty sure the scope flag exists purely to change the snippets based on the file open. Eg. Only snippets in scope python are used in .py files.

@dsisnero Hi. Did you run simple-completion-language-server fetch-external-snippet ?

my external snippets are working. I am on windows and when I have something like this in external-snippets.json. If I run

[[sources.paths]]
scope = ["ruby"]
path = "snippets/ruby/ruby.json"

if I run simple-completion-language-server validate-snippets I get
2024-12-02T19:42:01.399352Z ERROR simple_completion_language_server::snippets::config: On read dir "C:\\Users\\Dominic E Sisneros\\AppData\\Roaming\\helix\\snippets": The system cannot find the path specified. (os error 3)

What I want is the snippets directory to be relative to the external-snippets.toml file which is in c:\windows_home.config\helix

estin commented

Try to set env variable EXTERNAL_SNIPPETS_CONFIG=c:\windows_home.config\helix and SNIPPETS_PATH=c:\windows_home.config\helix for all

  • simple-completion-language-server fetch-external-snippet
  • simple-completion-language-server validate-snippets
  • and lsp mod