aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/completion.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-02-12 14:16:47 +0100
committerJustin M. Keyes <justinkz@gmail.com>2026-03-11 18:00:18 +0100
commitb8a976afdaf0080498e85530fae65a3165f201d5 (patch)
treedf9889722d148f6d97f3821264a7c0255d5bee8b /runtime/lua/vim/lsp/completion.lua
parent4aeeaa80273eda1cf4fdb5de4b8ea65a16cefbaf (diff)
downloadrneovim-b8a976afdaf0080498e85530fae65a3165f201d5.tar.gz
rneovim-b8a976afdaf0080498e85530fae65a3165f201d5.tar.bz2
rneovim-b8a976afdaf0080498e85530fae65a3165f201d5.zip
docs: api, messages, lsp, trust
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
Diffstat (limited to 'runtime/lua/vim/lsp/completion.lua')
-rw-r--r--runtime/lua/vim/lsp/completion.lua17
1 files changed, 8 insertions, 9 deletions
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 `<c-y>` 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 `<c-y>` 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|.