From 6566b66f65a2b96061b42cdc48ea27ad7cd00973 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Wed, 26 Mar 2025 14:43:40 +0100 Subject: docs(lsp): completion.enable #33063 --- runtime/lua/vim/lsp/completion.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/completion.lua b/runtime/lua/vim/lsp/completion.lua index 4f16d4173a..77cd30c87b 100644 --- a/runtime/lua/vim/lsp/completion.lua +++ b/runtime/lua/vim/lsp/completion.lua @@ -786,7 +786,17 @@ local function disable_completions(client_id, bufnr) end end ---- Enables or disables completions from the given language client in the given buffer. +--- Enables or disables completions from the given language client in the given +--- buffer. Effects of enabling completions are: +--- +--- - Calling |vim.lsp.completion.get()| uses the enabled clients to retrieve +--- completion candidates +--- +--- - Accepting a completion candidate using `` applies side effects like +--- expanding snippets, text edits (e.g. insert import statements) and +--- executing associated commands. This works for completions triggered via +--- autotrigger, omnifunc or completion.get() +--- --- Example: |lsp-attach| |lsp-completion| --- --- Note: the behavior of `autotrigger=true` is controlled by the LSP `triggerCharacters` field. You -- cgit