From b8a976afdaf0080498e85530fae65a3165f201d5 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 12 Feb 2026 14:16:47 +0100 Subject: docs: api, messages, lsp, trust gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features. --- runtime/lua/vim/lsp/completion.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'runtime/lua/vim/lsp/completion.lua') diff --git a/runtime/lua/vim/lsp/completion.lua b/runtime/lua/vim/lsp/completion.lua index 4910c415d9..e495af4240 100644 --- a/runtime/lua/vim/lsp/completion.lua +++ b/runtime/lua/vim/lsp/completion.lua @@ -6,7 +6,7 @@ --- --- Example: activate LSP-driven auto-completion: --- ```lua ---- -- Works best with completeopt=noselect. +--- -- Works best if 'completeopt' has "noselect". --- -- Use CTRL-Y to select an item. |complete_CTRL-Y| --- vim.cmd[[set completeopt+=menuone,noselect,popup]] --- vim.lsp.start({ @@ -1159,15 +1159,14 @@ end --- 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 +--- - Calling |vim.lsp.completion.get()| uses the enabled clients to retrieve completion candidates. +--- - Selecting a completion item shows a preview popup ("completionItem/resolve") if 'completeopt' +--- has "popup". +--- - Accepting a completion item 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 [vim.lsp.completion.get()]. --- ---- - 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| +--- Examples: |lsp-attach| |lsp-completion| --- --- Note: the behavior of `autotrigger=true` is controlled by the LSP `triggerCharacters` field. You --- can override it on LspAttach, see |lsp-autocompletion|. -- cgit