aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/completion.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/lsp/completion.lua')
-rw-r--r--runtime/lua/vim/lsp/completion.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/completion.lua b/runtime/lua/vim/lsp/completion.lua
index cf6d07745f..09d38bbce3 100644
--- a/runtime/lua/vim/lsp/completion.lua
+++ b/runtime/lua/vim/lsp/completion.lua
@@ -518,11 +518,14 @@ local function on_insert_char_pre(handle)
end
local char = api.nvim_get_vvar('char')
- if not completion_timer and handle.triggers[char] then
+ local matched_clients = handle.triggers[char]
+ if not completion_timer and matched_clients then
completion_timer = assert(vim.uv.new_timer())
completion_timer:start(25, 0, function()
reset_timer()
- vim.schedule(M.trigger)
+ vim.schedule(function()
+ trigger(api.nvim_get_current_buf(), matched_clients)
+ end)
end)
end
end