yanking filenames in Neotree

This commit is contained in:
Mathias Schneider
2026-05-28 16:02:26 +02:00
parent 777312620a
commit c9a24374a8
@@ -8,6 +8,18 @@ return {
},
config = function()
require("neo-tree").setup({
window = {
mappings = {
["Y"] = function(state)
local node = state.tree:get_node()
local abs_path = node:get_id()
local rel_path = vim.fn.fnamemodify(abs_path, ":.")
vim.fn.setreg("+", rel_path)
vim.fn.setreg('"', rel_path)
vim.notify("Copied: " .. rel_path)
end,
},
},
-- Performance optimizations for large repositories
git_status_async = true,
git_status_async_options = {