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

@ -854,31 +854,31 @@ do
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
-- You can use 'stop_after_first' to run the first available formatter from the list -- You can use 'stop_after_first' to run the first available formatter from the list
javascript = { 'biome' }, javascript = { 'biome' },
typescript = { 'biome' }, typescript = { 'biome' },
javascriptreact = { 'biome' }, javascriptreact = { 'biome' },
typescriptreact = { 'biome' }, typescriptreact = { 'biome' },
scss = { 'biome' }, scss = { 'biome' },
pandoc = { 'biome' }, pandoc = { 'biome' },
markdown = { 'biome' }, markdown = { 'biome' },
json = { 'biome' }, json = { 'biome' },
css = { 'biome' }, css = { 'biome' },
yml = { 'biome' }, yml = { 'biome' },
html = { 'biome' }, html = { 'biome' },
php = { 'pretty-php' }, php = { 'pretty-php' },
cpp = { 'clang_format' }, cpp = { 'clang_format' },
sh = { 'shfmt' }, sh = { 'shfmt' },
go = { 'gofumpt' }, go = { 'gofumpt' },
python = { python = {
-- To fix auto-fixable lint errors -- To fix auto-fixable lint errors
'ruff_fix', 'ruff_fix',
-- To run the Ruff formatter -- To run the Ruff formatter
'ruff_format', 'ruff_format',
-- To organize the imports -- To organize the imports
'ruff_organize_imports', 'ruff_organize_imports',
},
}, },
} },
}
vim.keymap.set({ 'n', 'v' }, '<leader>f', function() require('conform').format { async = true } end, { desc = '[F]ormat buffer' }) vim.keymap.set({ 'n', 'v' }, '<leader>f', function() require('conform').format { async = true } end, { desc = '[F]ormat buffer' })
end end
@ -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