mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 01:08:59 +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,
|
||||
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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue