neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 55bdb077b7069c018cc5ccf682417770abec5b4a
parent b750dee0a51917b236bdfe6fe6297fe5854f73a5
Author: glepnir <glephunter@gmail.com>
Date:   Tue, 11 Mar 2025 20:05:36 +0800

fix(lsp): wrapped ctx in opts before passed to vim.lsp.completion.trigger #32837

Problem: ctx is passed directly to M.trigger. In fact, it is a field of opts.

Solution: wrapped in a table and passed to M.trigger.
Diffstat:
Mruntime/lua/vim/lsp/completion.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/lua/vim/lsp/completion.lua b/runtime/lua/vim/lsp/completion.lua @@ -536,7 +536,7 @@ local function on_insert_char_pre(handle) local ctx = { triggerKind = protocol.CompletionTriggerKind.TriggerForIncompleteCompletions } if debounce_ms == 0 then vim.schedule(function() - M.trigger(ctx) + M.trigger({ ctx = ctx }) end) else completion_timer = new_timer() @@ -544,7 +544,7 @@ local function on_insert_char_pre(handle) debounce_ms, 0, vim.schedule_wrap(function() - M.trigger(ctx) + M.trigger({ ctx = ctx }) end) ) end