aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-10-30 10:58:12 -0400
committerGitHub <noreply@github.com>2020-10-30 10:58:12 -0400
commit98024853f4755f51e82526b45484bae0ec6042ba (patch)
treefb2a4bfefc059731bf534455ba278ff6f70309d9 /runtime/lua/vim/lsp/protocol.lua
parent9fee5f14239512aed1096b17e8e755c87b9055d2 (diff)
downloadrneovim-98024853f4755f51e82526b45484bae0ec6042ba.tar.gz
rneovim-98024853f4755f51e82526b45484bae0ec6042ba.tar.bz2
rneovim-98024853f4755f51e82526b45484bae0ec6042ba.zip
lsp: Remove snippet lies (#13183)
We don't actually support snippets in core in the way that users would truly expect. So, by default, we will not say that builtin-lsp has `snippetSupport`. To re-enable, users can do the following: First, get a capabilities dictionary with `local capabilities = vim.lsp.protocol.make_client_capabilities()` Then override `capabilities.textDocument.completion.completionItem.snippetSupport = true` and then pass those capabilties to the setup function. ``` nvim_lsp.server_name.setup { ..., capabilities = capabilities, ..., } ``` See https://github.com/neovim/neovim/issues/12795
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 2773f59b45..36c9822e23 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -639,8 +639,11 @@ function protocol.make_client_capabilities()
completion = {
dynamicRegistration = false;
completionItem = {
+ -- Until we can actually expand snippet, move cursor and allow for true snippet experience,
+ -- this should be disabled out of the box.
+ -- However, users can turn this back on if they have a snippet plugin.
+ snippetSupport = false;
- snippetSupport = true;
commitCharactersSupport = false;
preselectSupport = false;
deprecatedSupport = false;