From 98024853f4755f51e82526b45484bae0ec6042ba Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Fri, 30 Oct 2020 10:58:12 -0400 Subject: 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 --- runtime/lua/vim/lsp/protocol.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim') 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; -- cgit