mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(ai): mappings for accept when ai_cmp=false
This commit is contained in:
parent
a3a28bf8e4
commit
da77adfa60
3 changed files with 10 additions and 12 deletions
|
|
@ -11,9 +11,7 @@ return {
|
|||
virtual_text = {
|
||||
enabled = not vim.g.ai_cmp,
|
||||
key_bindings = {
|
||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
accept = not vim.g.ai_cmp and "<M-l>" or false, -- handled by nvim-cmp / blink.cmp
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -39,11 +37,13 @@ return {
|
|||
optional = true,
|
||||
dependencies = { "codeium.nvim" },
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
if vim.g.ai_cmp then
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ return {
|
|||
enabled = not vim.g.ai_cmp,
|
||||
auto_trigger = true,
|
||||
keymap = {
|
||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
accept = not vim.g.ai_cmp and "<M-l>" or false, -- handled by nvim-cmp / blink.cmp
|
||||
},
|
||||
},
|
||||
panel = { enabled = false },
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ return {
|
|||
},
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp
|
||||
accept_suggestion = not vim.g.ai_cmp and "<M-l>" or nil, -- handled by nvim-cmp / blink.cmp
|
||||
},
|
||||
disable_inline_completion = vim.g.ai_cmp,
|
||||
ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue