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