Replies: 1 comment 1 reply
-
I think this works:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I would want to add some custom action to execute while neo-tree buffer is active. Not a mapping, rather for example to create a file when a menu item in the right mouse click menu is selected.
The
mappins = {
has many actions. How do I call these actions to do from a lua function to do in the context currently selected under the cursor inside neo-tree window?For example in nvimtree I can do
local api = require "nvim-tree.api"
local node = api.tree.get_node_under_cursor
api.fs.create(node())
. How to do that in neo-tree?There is execute https://github.com/nvim-neo-tree/neo-tree.nvim/blob/main/lua/neo-tree/command/init.lua#L46 but it only hides or shows, and it's for when neo-tree is not in focus. Neo-tree will be in focus.
There are commands https://github.com/nvim-neo-tree/neo-tree.nvim/blob/main/lua/neo-tree/sources/common/commands.lua#L107 , but how do I get the current state?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions