Skip to content

Commit 10cadb1

Browse files
committed
fix: update to handle didRenameFiles only on successful renaming
1 parent 6f5ceac commit 10cadb1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/astrolsp/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ function M.setup(opts)
246246
group = rename_augroup,
247247
desc = "trigger didRenameFiles LSP operation on AstroCore file rename",
248248
pattern = "AstroRenameFilePost",
249-
callback = function(args) require("astrolsp.file_operations").didRenameFiles(args.data) end,
249+
callback = function(args)
250+
if args.data.success then require("astrolsp.file_operations").didRenameFiles(args.data) end
251+
end,
250252
})
251253

252254
-- normalize format_on_save to table format

0 commit comments

Comments
 (0)