Update nvim-tree & completion keybindings

This commit is contained in:
Sonny Bakker 2026-05-02 16:26:24 +02:00
parent 82d6405ab7
commit 8f518dd716
2 changed files with 4 additions and 1 deletions

View file

@ -155,7 +155,7 @@ cmp.setup {
mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-u>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {

View file

@ -18,6 +18,9 @@ local function my_on_attach(bufnr)
vim.keymap.set('n', '<C-]>', api.tree.change_root_to_node, opts('CD'))
vim.keymap.set('n', '<C-H>', api.tree.toggle_hidden_filter, opts('Toggle filter: Dotfiles'))
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
vim.keymap.set('n', '<C-t>', api.node.open.tab, opts('Open: New Tab'))
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
vim.keymap.set('n', '<C-x>', api.node.open.horizontal, opts('Open: Horizontal Split'))
vim.keymap.set('n', 'E', api.tree.expand_all, opts('Expand All'))
vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse All'))
vim.keymap.set('n', 'F', api.live_filter.clear, opts('Live filter: Clear'))