blink keymap c-x

This commit is contained in:
Your Name 2026-07-19 17:03:33 +08:00
parent b760e60ce7
commit 2704af98e9
1 changed files with 32 additions and 30 deletions

View File

@ -936,6 +936,12 @@ do
-- --
-- See `:help blink-cmp-config-keymap` for defining your own keymap -- See `:help blink-cmp-config-keymap` for defining your own keymap
preset = 'enter', preset = 'enter',
['<C-x>'] = {
function(cmp) cmp.show() end,
'show',
'show_documentation',
'hide_documentation',
},
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
@ -974,15 +980,11 @@ do
-- Luasnip choice node navigation -- Luasnip choice node navigation
vim.keymap.set({ 'i', 's' }, '<C-l>', function() vim.keymap.set({ 'i', 's' }, '<C-l>', function()
if require('luasnip').choice_active() then if require('luasnip').choice_active() then require('luasnip').change_choice(1) end
require('luasnip').change_choice(1)
end
end, { desc = 'LuaSnip: next choice' }) end, { desc = 'LuaSnip: next choice' })
vim.keymap.set({ 'i', 's' }, '<C-h>', function() vim.keymap.set({ 'i', 's' }, '<C-h>', function()
if require('luasnip').choice_active() then if require('luasnip').choice_active() then require('luasnip').change_choice(-1) end
require('luasnip').change_choice(-1)
end
end, { desc = 'LuaSnip: previous choice' }) end, { desc = 'LuaSnip: previous choice' })
end end