Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only do a single pass on running code actions on save #2283

Merged
merged 2 commits into from
Jun 4, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Jun 3, 2023

Previously we have been re-running Code Actions on Save if the document got modified by code action. This have in some cases resulted in a loop that would only terminate on timeout. Changed so that each server only has one chance to run code actions on save.

Fixes #2231
Fixes sublimelsp/LSP-typescript#202

Copy link

@predrag-codetribe predrag-codetribe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ✅

I checked

  • "source.fixAll.eslint" - with the code from this PR, this will no longer happen Run code actions on save only once  #2270
  • and "source.organizeImports" (with LSP-typescript), I am able to undo as expected, (previously it was sometimes impossible to undo)

@rchl rchl merged commit bc1ffd7 into main Jun 4, 2023
@rchl rchl deleted the fix/code-actions-on-save-once branch June 4, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

organizeImports and fixAll in a loop! organizeImports in lsp_code_actions_on_save is making Undo unusable
2 participants