mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-15 03:44:38 +02:00
fix(neo-tree): Add description to "Y" in Neo-Tree (#2642)
It copies the path of the file/directory
This commit is contained in:
parent
c43afbbdbb
commit
1a417430fc
1 changed files with 8 additions and 5 deletions
|
@ -61,11 +61,14 @@ return {
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["<space>"] = "none",
|
["<space>"] = "none",
|
||||||
["Y"] = function(state)
|
["Y"] = {
|
||||||
|
function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
local path = node:get_id()
|
local path = node:get_id()
|
||||||
vim.fn.setreg("+", path, "c")
|
vim.fn.setreg("+", path, "c")
|
||||||
end,
|
end,
|
||||||
|
desc = "copy path to clipboard",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue