mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-25 18:28:50 +02:00
feat(neo-tree): Adds copy file name command to Neo-Tree with 'Y' binding (#2137)
Co-authored-by: Ricardo Rebelo <ricardo.rebelo@siemens.com>
This commit is contained in:
parent
71a73e8334
commit
5296d42e6a
1 changed files with 6 additions and 0 deletions
|
@ -57,10 +57,16 @@ return {
|
||||||
bind_to_cwd = false,
|
bind_to_cwd = false,
|
||||||
follow_current_file = { enabled = true },
|
follow_current_file = { enabled = true },
|
||||||
use_libuv_file_watcher = 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 = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["<space>"] = "none",
|
["<space>"] = "none",
|
||||||
|
["Y"] = "copy_file_name",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue