Skip to content

Commit

Permalink
fix: Organize import crash when scala file has an error (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
SvSchen committed Feb 3, 2025
1 parent 7f84763 commit 32e3de2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/metals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ M.organize_imports = function()
for _, result in pairs(response.result or {}) do
if result.edit then
lsp.util.apply_workspace_edit(result.edit, "utf-16")
elseif result.disabled then
vim.notify(result.disabled.reason, vim.log.levels.WARN)
else
lsp.buf.execute_command(result)
end
Expand Down

0 comments on commit 32e3de2

Please sign in to comment.