mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
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
This commit is contained in:
parent
9fee5f1423
commit
98024853f4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user