Skip to content

Commit

Permalink
fix: update to handle didRenameFiles only on successful renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Feb 20, 2025
1 parent 541e500 commit c8d8bd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/astrolsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ function M.setup(opts)
group = rename_augroup,
desc = "trigger didRenameFiles LSP operation on AstroCore file rename",
pattern = "AstroRenameFilePost",
callback = function(args) require("astrolsp.file_operations").didRenameFiles(args.data) end,
callback = function(args)
if args.data.success then require("astrolsp.file_operations").didRenameFiles(args.data) end
end,
})

-- normalize format_on_save to table format
Expand Down

0 comments on commit c8d8bd2

Please sign in to comment.