debug completion
This commit is contained in:
parent
9e92bac51d
commit
bc1b033ca1
@ -46,8 +46,7 @@ function M.setup(opts)
|
||||
-- Set up completion
|
||||
require("gemini.completion").setup()
|
||||
|
||||
-- Remove the existing TextChangedI autocmd as it's now handled in completion.lua
|
||||
-- Instead, just ensure the completion is available
|
||||
-- Set up the completion keymap
|
||||
vim.keymap.set('i', '<C-g><C-g>', function()
|
||||
require("gemini.completion").trigger_completion()
|
||||
end, { desc = 'Trigger Gemini completion' })
|
||||
@ -110,15 +109,8 @@ function M.complete(findstart, base)
|
||||
}
|
||||
|
||||
-- Start completion request
|
||||
completion.get_completion({ word = base }, function(completions)
|
||||
if #completions > 0 then
|
||||
vim.schedule(function()
|
||||
-- Update the completion menu
|
||||
vim.fn.complete(vim.fn.col('.') - #base, completions)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
require("gemini.completion").trigger_completion()
|
||||
|
||||
return items
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user