Inform lsp of neotree file rename

This commit is contained in:
Dreaded_X 2025-06-01 19:43:50 +02:00
parent 707010aadc
commit 6c5e5bb8c0
Signed by: Dreaded_X
GPG Key ID: 5A0CBFE3C3377FAA

View File

@ -28,4 +28,18 @@ return {
}, },
}, },
}, },
{
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
local function on_move(data)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
end,
},
} }