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

Clojure files hang sometimes in UNSAVED state #102

Open
avli opened this issue Mar 11, 2018 · 3 comments
Open

Clojure files hang sometimes in UNSAVED state #102

avli opened this issue Mar 11, 2018 · 3 comments

Comments

@avli
Copy link
Owner

avli commented Mar 11, 2018

Clojure files hang sometimes in the UNSAVED state event after Cmd+s or File -> Save. Not sure it's an extension issue – need to figure out.

Here is the first mention of the glitch.

@paschdan
Copy link

for me this will only happen when
clojureVSCode.formatOnSave is set to true

@williamlindsay
Copy link

williamlindsay commented May 24, 2018

I'm having the same problem. Doesn't seem to happen to every file in my project but definitely most of them although I'm not sure what the difference is which triggers this behavior. Even having a file with just (defn foo [x] x) in it causes this problem. Also, if I make a change that requires a fix from cljfmt, save the file, then close it to discard then unsaved changes, then reopen it, the file will be in the pre-cljfmt-fix state which means that the transformations done by cljfmt are occurring after the save is done. I did a bit of digging on the VS Code documentation and found that the vscode.workspace.onWillSaveTextDocument method allows you to register async work and the formatFile method in clojureFormat.ts looks like it does some async work. So maybe making it async will solve this? I actually created a branch which solves it https://github.com/williamlindsay/clojureVSCode that said I did a bit more work in it since I want to do a few more things.

@juusaw
Copy link

juusaw commented Nov 26, 2018

Is there any progress on this? I'm also experiencing the problem and a fix would be great.

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

No branches or pull requests

4 participants