fix(nvim): Use Tab, S-Tab to navigate between cursor positions

This commit is contained in:
js0ny 2025-03-05 12:38:30 +00:00
parent 69f40cd1f1
commit 869e6ed042
3 changed files with 44 additions and 28 deletions

View file

@ -1,13 +0,0 @@
--- `map` default for `cmp.mapping`
local map = function(map)
return {
{ keys = "<C-n>", cmd = map.select_next_item(), opts = { desc = "Select next completion item" } },
{ keys = "<C-p>", cmd = map.select_prev_item(), opts = { desc = "Select previous completion item" } },
{ keys = "<C-f>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
{ keys = "<Tab>", cmd = map.confirm({ select = true }), opts = { desc = "Confirm completion" } },
{ keys = "<C-Space>", cmd = map.complete(), opts = { desc = "Trigger completion" } },
{ keys = "<C-b>", cmd = map.abort(), opts = { desc = "Abort completion" } },
}
end
return map

View file

@ -21,8 +21,6 @@ utils.set_keymaps(keymaps_modifier)
M.nvim_tree_keymaps = require("keymaps.nvim-tree").plugin
M.cmp_nvim_keymaps = require("keymaps.cmp_map")
-- local function set_markdown_keymaps(bufnr)
-- local opts = { noremap = true, silent = true, buffer = bufnr }
-- vim.keymap.set("v", "`", 'c`<C-r>"`<Esc>', opts)