docs(lsp): tweak inline_completion.get code snippet #35657

`replace_keycodes` is true if `expr` is set, and "Accept" is a better
term to describe the keymap.
This commit is contained in:
Maria José Solano
2025-09-06 16:12:32 -07:00
committed by GitHub
parent f23bd47254
commit 21f2c2b19c
2 changed files with 2 additions and 10 deletions

View File

@@ -2295,11 +2295,7 @@ get({opts}) *vim.lsp.inline_completion.get()*
if not vim.lsp.inline_completion.get() then if not vim.lsp.inline_completion.get() then
return '<Tab>' return '<Tab>'
end end
end, { end, { expr = true, desc = 'Accept the current inline completion' })
expr = true,
replace_keycodes = true,
desc = 'Get the current inline completion',
})
< <
Parameters: ~ Parameters: ~

View File

@@ -439,11 +439,7 @@ end
--- if not vim.lsp.inline_completion.get() then --- if not vim.lsp.inline_completion.get() then
--- return '<Tab>' --- return '<Tab>'
--- end --- end
--- end, { --- end, { expr = true, desc = 'Accept the current inline completion' })
--- expr = true,
--- replace_keycodes = true,
--- desc = 'Get the current inline completion',
--- })
--- ```` --- ````
---@param opts? vim.lsp.inline_completion.get.Opts ---@param opts? vim.lsp.inline_completion.get.Opts
---@return boolean `true` if a completion was applied, else `false`. ---@return boolean `true` if a completion was applied, else `false`.