mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 17:24:29 +00:00
docs: news, lsp autocomplete #33047
This commit is contained in:
@@ -22,6 +22,14 @@
|
||||
--- end,
|
||||
--- })
|
||||
--- ```
|
||||
---
|
||||
--- [lsp-autocompletion]()
|
||||
---
|
||||
--- The LSP `triggerCharacters` field decides when to trigger autocompletion. If you want to trigger
|
||||
--- on EVERY keypress you can either:
|
||||
--- - Extend `client.server_capabilities.completionProvider.triggerCharacters` on `LspAttach`,
|
||||
--- before you call `vim.lsp.completion.enable(… {autotrigger=true})`. See the |lsp-attach| example.
|
||||
--- - Call `vim.lsp.completion.get()` from the handler described at |compl-autocomplete|.
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -781,6 +789,9 @@ end
|
||||
--- Enables or disables completions from the given language client in the given buffer.
|
||||
--- Example: |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|.
|
||||
---
|
||||
--- @param enable boolean True to enable, false to disable
|
||||
--- @param client_id integer Client ID
|
||||
--- @param bufnr integer Buffer handle, or 0 for the current buffer
|
||||
|
||||
Reference in New Issue
Block a user