Adds copy file name command to Neo-Tree with 'Y' binding

This commit is contained in:
Ricardo Rebelo 2023-12-05 11:58:09 +00:00
parent 879e29504d
commit 8f57e997d0

View file

@ -57,10 +57,16 @@ return {
bind_to_cwd = false,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
commands = {
copy_file_name = function(state)
local node = state.tree:get_node()
vim.fn.setreg("*", node.name, "c")
end,
},
window = {
mappings = {
["<space>"] = "none",
["Y"] = "copy_file_name",
},
},
default_component_configs = {