yanking filenames in Neotree
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user