Removed ctrl movements and asjusted cmp keystrokes

This commit is contained in:
2024-08-15 04:33:11 +04:00
parent 6d55a5d90a
commit 00273a75b4
2 changed files with 6 additions and 12 deletions

View File

@@ -6,9 +6,3 @@ keymap("n", "<C-h>", "<C-w>h", opts)
keymap("n", "<C-j>", "<C-w>j", opts) keymap("n", "<C-j>", "<C-w>j", opts)
keymap("n", "<C-k>", "<C-w>k", opts) keymap("n", "<C-k>", "<C-w>k", opts)
keymap("n", "<C-l>", "<C-w>l", opts) keymap("n", "<C-l>", "<C-w>l", opts)
-- Map Ctrl+h, Ctrl+j, Ctrl+k, Ctrl+l to navigation in insert mode
keymap("i", "<C-h>", "<Left>", opts)
keymap("i", "<C-j>", "<Down>", opts)
keymap("i", "<C-k>", "<Up>", opts)
keymap("i", "<C-l>", "<Right>", opts)

View File

@@ -28,12 +28,12 @@ return {
end, end,
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-S-k>"] = cmp.mapping.select_prev_item(), ["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-S-j>"] = cmp.mapping.select_next_item(), ["<C-j>"] = cmp.mapping.select_next_item(),
["<C-S-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-S-f>"] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-S-Space>"] = cmp.mapping.complete(), ["<C-space>"] = cmp.mapping.complete(),
["<C-S-e>"] = cmp.mapping.abort(), ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }), ["<CR>"] = cmp.mapping.confirm({ select = false }),
}), }),