diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f23d4544..153cb786 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -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 = { [""] = "none", + ["Y"] = "copy_file_name", }, }, default_component_configs = {