Skip to content

Use codeactions & textedits to update the document text#5

Closed
badsyntax wants to merge 1 commit intomasterfrom
codeactions-fix
Closed

Use codeactions & textedits to update the document text#5
badsyntax wants to merge 1 commit intomasterfrom
codeactions-fix

Conversation

@badsyntax
Copy link
Copy Markdown
Owner

@badsyntax badsyntax commented May 3, 2020

This fixes further race conditions. It's a little hacky as I have to use temp files to get formatted file contents, and update the vscode config to ignore the temp files.

Also the auto-fix on save doesn't work the first time you run it, and not sure why.

This fixes further race conditions. It's a little hacky as I have to use temp files to get formatted file contents.

Also the auto-fix on save doesn't work the first time you run it, and not sure why.
@badsyntax
Copy link
Copy Markdown
Owner Author

Note this PR is a POC and I probably won't merge it. See https://gist.github.com/badsyntax/d6b3c0676d9f99a9784327e5004d889d for reasons for this approach.

A better approach would be to get spotless to write to stdout. Related PR: diffplug/spotless#568

@badsyntax badsyntax closed this May 8, 2020
@badsyntax badsyntax deleted the codeactions-fix branch June 4, 2020 20:57
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.

1 participant