Add description to "Y" in Neo-Tree

It copies the path of the file/directory
This commit is contained in:
Aman9das 2024-03-03 15:07:49 +05:30 committed by GitHub
parent 91126b9896
commit 791e081bfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,11 +61,14 @@ return {
window = { window = {
mappings = { mappings = {
["<space>"] = "none", ["<space>"] = "none",
["Y"] = function(state) ["Y"] = {
local node = state.tree:get_node() function(state)
local path = node:get_id() local node = state.tree:get_node()
vim.fn.setreg("+", path, "c") local path = node:get_id()
end, vim.fn.setreg("+", path, "c")
end,
desc = "copy path to clipboard",
},
}, },
}, },
default_component_configs = { default_component_configs = {