refactor(lsp)!: rename lsp.completion.trigger() to get() (#32911)

Problem: `trigger` is a custom word not yet used in APIs. 

Solution: Use `get` instead because the main effect is that the 
completion candidates will be collected (and shown by default,
but follow-up commits are planned to add an `on_result` callback
that allows more general handling).

---------

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
This commit is contained in:
Mathias Fußenegger
2025-03-16 13:58:38 +01:00
committed by GitHub
parent f5dd30948e
commit 3e3775961f
5 changed files with 11 additions and 10 deletions

View File

@@ -847,7 +847,7 @@ describe('vim.lsp.completion: protocol', function()
exec_lua(function()
local win = vim.api.nvim_get_current_win()
vim.api.nvim_win_set_cursor(win, pos)
vim.lsp.completion.trigger()
vim.lsp.completion.get()
end)
retry(nil, nil, function()
@@ -1153,7 +1153,7 @@ describe('vim.lsp.completion: protocol', function()
end,
})
vim.lsp.completion.trigger()
vim.lsp.completion.get()
return params
end)