Closed frangio closed 1 month ago
snippetSupport
is true by default
That's not what I see. The return value of vim.lsp.protocol.make_client_capabilities
says snippetSupport = false
for me.
It was false until https://github.com/neovim/neovim/pull/27339 which was merged to master only yesterday.
https://github.com/neovim/neovim/blob/master/runtime/lua/vim/lsp/protocol.lua#L741
I can't reproduce it show me true by default.
https://github.com/neovim/neovim/blob/v0.10.0/runtime/lua/vim/lsp/protocol.lua#L744
Snippet support is not the point of this PR. I want to be able to globally set the default config and have that apply to all providers. That isn't working for capabilities with some providers, and this PR fixes that.
Snippet support is not the point of this PR.
? you said you set this but it overide.
and this will cause some default capabilities missing . there is not extend.
The default capabilities are set in util.lua
: https://github.com/neovim/nvim-lspconfig/blob/b124ef3bd4435a6db7ff03ea2f5a23e1e0487552/lua/lspconfig/util.lua#L19
And they get combined with each config here: https://github.com/neovim/nvim-lspconfig/blob/b124ef3bd4435a6db7ff03ea2f5a23e1e0487552/lua/lspconfig/configs.lua#L60
So there shouldn't be any missing capabilities. As far as I could tell this is already how it's handled by most providers in lspconfig but the few included in this PR were not.
thanks
A config's
default_config
acts as an override to the globaldefault_config
because of'keep'
here:https://github.com/neovim/nvim-lspconfig/blob/38de86f82efd9ba0881203767d6a8e1815abca28/lua/lspconfig/configs.lua#L60
Some configs were providing the entire capabilities table in their
default_config
. This is not necessary because the globaldefault_config
already includes them, and it was causing any of the user's changes to be overridden.https://github.com/neovim/nvim-lspconfig/blob/38de86f82efd9ba0881203767d6a8e1815abca28/lua/lspconfig/util.lua#L19
The specific issue I was facing was that globally setting
snippetSupport = true
was ignored for rust_analyzer.