I would like this behaviour to continue working in all windows, including the nvim-tree one.
I have checked the on_attach section in the manual, however adding vim.keymap.del() after the api.config.mappings.default_on_attach(bufnr) does not seem to work.
Any clues?
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\n\n\nrequire(\"nvim-tree\").setup({\n on_attach = my_on_attach()\n})
I think that's going to set on_attach to nil - the result of the function.
Try setting to the function itself, so that it may be called when creating the tree, see :help nvim-tree-mappings
\n require(\"nvim-tree\").setup({\n ---\n on_attach = my_on_attach,\n ----
|
I would like to prevent NVimTree from taking over For example, I normally have function NormalTab()
if winnr('$') > 1
execute "normal \<C-w>w"
elseif len(getbufinfo({'buflisted': 1})) > 1
:bnext
endif
endfunctionI would like this behaviour to continue working in all windows, including the I have checked the Any clues? |
Beta Was this translation helpful? Give feedback.
-
|
How are you deleting the keymap? Are you specifying the buffer? From my config: vim.keymap.del("n", "<BS>", { buffer = bufnr }) -- api.node.navigate.parent_close, |
Beta Was this translation helpful? Give feedback.
I think that's going to set
on_attachto nil - the result of the function.Try setting to the function itself, so that it may be called when creating the tree, see :help nvim-tree-mappings