@@ -332,6 +332,7 @@ They are also listed below.
332332- `' textDocument/formatting' `
333333- `' textDocument/hover' `
334334- `' textDocument/inlayHint' `
335+ - `' textDocument/inlineCompletion' `
335336- `' textDocument/publishDiagnostics' `
336337- `' textDocument/rangeFormatting' `
337338- `' textDocument/rename' `
@@ -2219,6 +2220,73 @@ is_enabled({filter}) *vim.lsp.inlay_hint.is_enabled()*
22192220 (`boolean ` )
22202221
22212222
2223+ ==============================================================================
2224+ Lua module: vim.lsp.inline_completion *lsp-inline_completion*
2225+
2226+ enable({enable} , {filter} ) *vim.lsp.inline_completion.enable()*
2227+ Enables or disables inline completion for the {filter} ed scope, inline
2228+ completion will automatically be refreshed when you are in insert mode.
2229+
2230+ To "toggle", pass the inverse of `is_enabled ()` : >lua
2231+ vim.lsp.inline_completion.enable(not vim.lsp.inline_completion.is_enabled())
2232+ <
2233+
2234+ Parameters: ~
2235+ • {enable} (`boolean ?` ) true/nil to enable, false to disable
2236+ • {filter} (`table?` ) Optional filters | kwargs | ,
2237+ • {bufnr} ? (`integer` , default: all) Buffer number, or 0 for
2238+ current buffer, or nil for all.
2239+ • {client_id}? (`integer` , default: all) Client ID, or nil
2240+ for all.
2241+
2242+ get({opts} ) *vim.lsp.inline_completion.get()*
2243+ Apply the currently displayed completion candidate to the buffer.
2244+
2245+ It returns false when no candidate can be applied, so you can use the
2246+ return value to implement a fallback: >lua
2247+ vim.keymap.set('i', '<Tab> ', function()
2248+ if not vim.lsp.inline_completion.get() then
2249+ return '<Tab> '
2250+ end
2251+ end, {
2252+ expr = true,
2253+ replace_keycodes = true,
2254+ desc = 'Get the current inline completion',
2255+ })
2256+ <
2257+
2258+ Parameters: ~
2259+ • {opts} (`table?` ) A table with the following fields:
2260+ • {bufnr} ? (`integer` , default: 0) Buffer handle, or 0 for
2261+ current.
2262+
2263+ Return: ~
2264+ (`boolean ` ) `true` if a completion was applied, else `false` .
2265+
2266+ is_enabled({filter} ) *vim.lsp.inline_completion.is_enabled()*
2267+ Query whether inline completion is enabled in the {filter} ed scope
2268+
2269+ Parameters: ~
2270+ • {filter} (`table?` ) Optional filters | kwargs | ,
2271+ • {bufnr} ? (`integer` , default: all) Buffer number, or 0 for
2272+ current buffer, or nil for all.
2273+ • {client_id}? (`integer` , default: all) Client ID, or nil
2274+ for all.
2275+
2276+ select({opts} ) *vim.lsp.inline_completion.select()*
2277+ Switch between available inline completion candidates.
2278+
2279+ Parameters: ~
2280+ • {opts} (`table?` ) A table with the following fields:
2281+ • {bufnr} ? (`integer` ) (default: current buffer)
2282+ • {count} ? (`integer` , default: v:count1) The number of
2283+ candidates to move by. A positive integer moves forward by
2284+ {count} candidates, while a negative integer moves backward
2285+ by {count} candidates.
2286+ • {wrap} ? (`boolean ` , default: `true` ) Whether to loop around
2287+ file or not. Similar to 'wrapscan' .
2288+
2289+
22222290==============================================================================
22232291Lua module: vim.lsp.linked_editing_range *lsp-linked_editing_range*
22242292
0 commit comments