Inform lsp of neotree file rename
This commit is contained in:
parent
707010aadc
commit
6c5e5bb8c0
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user