diff options
author | glepnir <glephunter@gmail.com> | 2025-03-11 20:05:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 05:05:36 -0700 |
commit | 55bdb077b7069c018cc5ccf682417770abec5b4a (patch) | |
tree | 78ed8dbc7425a696541982e43a32a6909266b418 | |
parent | b750dee0a51917b236bdfe6fe6297fe5854f73a5 (diff) | |
download | rneovim-55bdb077b7069c018cc5ccf682417770abec5b4a.tar.gz rneovim-55bdb077b7069c018cc5ccf682417770abec5b4a.tar.bz2 rneovim-55bdb077b7069c018cc5ccf682417770abec5b4a.zip |
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.
-rw-r--r-- | runtime/lua/vim/lsp/completion.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/completion.lua b/runtime/lua/vim/lsp/completion.lua index 675921638d..4064e02597 100644 --- 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 |