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 = {
|
virtual_text = {
|
||||||
enabled = not vim.g.ai_cmp,
|
enabled = not vim.g.ai_cmp,
|
||||||
key_bindings = {
|
key_bindings = {
|
||||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
accept = not vim.g.ai_cmp and "<M-l>" or false, -- handled by nvim-cmp / blink.cmp
|
||||||
next = "<M-]>",
|
|
||||||
prev = "<M-[>",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -39,11 +37,13 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = { "codeium.nvim" },
|
dependencies = { "codeium.nvim" },
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sources, 1, {
|
if vim.g.ai_cmp then
|
||||||
name = "codeium",
|
table.insert(opts.sources, 1, {
|
||||||
group_index = 1,
|
name = "codeium",
|
||||||
priority = 100,
|
group_index = 1,
|
||||||
})
|
priority = 100,
|
||||||
|
})
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@ return {
|
||||||
enabled = not vim.g.ai_cmp,
|
enabled = not vim.g.ai_cmp,
|
||||||
auto_trigger = true,
|
auto_trigger = true,
|
||||||
keymap = {
|
keymap = {
|
||||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
accept = not vim.g.ai_cmp and "<M-l>" or false, -- handled by nvim-cmp / blink.cmp
|
||||||
next = "<M-]>",
|
|
||||||
prev = "<M-[>",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
panel = { enabled = false },
|
panel = { enabled = false },
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ return {
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
keymaps = {
|
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,
|
disable_inline_completion = vim.g.ai_cmp,
|
||||||
ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" },
|
ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue