TypeFox / yang-lsp

A Language Server for YANG
http://www.yang-central.org
Apache License 2.0
51 stars 13 forks source link

Add option to disable snippets #212

Open Hubro opened 3 years ago

Hubro commented 3 years ago

yang-lsp is producing snippets that conflict with my own snippets:

image

If I enable LSP completions in my completion plugin (nvim-compe) it shows both completions and snippets. I have tried unsuccessfully to disable snippets in the LSP client settings in Neovim:

lspconfig.yang_lsp.setup {
  capabilities = {
    textDocument = {
      completion = {
        completionItem = {
          snippetSupport = false
        }
      }
    }
  }
}

I'm not sure if this setting is just a suggestion for the LSP, which is ignored (?)

It would be nice if there was a setting in yang.settings that would let me disable snippets from being suggested to the editor.

FaizanFrolic commented 2 years ago

Hi, We are also facing the same kind of issue. We wanted to have one of our own custom snippets for "leaf" from our plugin. It will be helpful if lsp-yang plugin provides a setting/API to enable/disable any completions/snippets OR a way to extend it from other plugins.

Screen Shot 2022-06-14 at 11 45 47 AM