toggle quit_on_open functionality with keymap #2757
Replies: 1 comment
-
That recipe specifically doesn't need to reload nvim-tree, which is very undesirable for performance, state etc. reasons. There's currently no mechanism to dynamically change quit on open behaviour or any functionality like that. Adding such mechanisms is not trivial. Options:
• {close} (boolean) close the tree after opening, default false
It would be most gratefully appreciated if you created a PR for 2 - it's the cleanest and most accessible solution. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to make a keymap that toggles nvim-trees quit on open functionality on and off? i.e. toggle nvim-tree.actions.open_file.quit_on_open.
I'm pretty new to neovim, but I tried following these instructions, but didn't seem to work: https://github.com/nvim-tree/nvim-tree.lua/wiki/Recipes#toggle-adaptive-width not sure if it's because reload only reloads view settings and not action settings. This is my code:
I also saw on the example that in setup opts, they don't include the () for get_quit_on_open. When I do that, get an error saying that actions.open_file.quit_on_open. Expected boolean, got function
Beta Was this translation helpful? Give feedback.
All reactions