-
Notifications
You must be signed in to change notification settings - Fork 646
formatting doesn't work 90% of the time when language server is enabled #1667
Comments
Are you referring to just format on save feature? Or you are having issues with manual formatting as well?
|
Neither format on save nor manual formatting works. |
Even after disabling format on type and paste? |
Disabling all formatOnXXX doesn't change anything, neither using "Format Document" directly. There are no errors in the dev Console neither after save nor after "Format Document" Only things printed in the Go output panel:
Running |
I am running out of ideas ... If that doesnt help, can you try running the extension from source and see where its failing? |
I will when I get a chance, I've been very busy lately, maybe next weekend unless someone else figures it out. |
So #1662 (comment) seems to have fixed this problem as well, I don't understand how it's related (I didn't dig into the code yet). I won't close this issue yet in case it's just randomly working. |
@OneOfOne I'll close this issue nevertheless. If you see this happening again, you can re-open this issue. In case the issue is locked (which it does in 10 days or so), feel free to open a new issue |
So this is back, it's related to turning off |
So you are seeing this even after using the fix from #1662 correct? |
I randomly come across this as well, but no reliable repro steps. Can you keep the Output pane open, choose the "go-langserver" channel there and the next time you see formatting stop, check if the output pane has any formatting related error |
|
That looks similar to what I logged in sourcegraph/go-langserver#277 |
@OneOfOne I've added a setting to opt in to the not yet stable features from the language server. Try the below and your formatting issues should be solved even when
And when you want to try the formatting feature from the language server, add the below setting
|
You rock, thanks. I'll try it once I get home tomorrow morning. |
Like the title, there are no errors in any of the panels.
Sometimes it'll work, most of the time it doesn't.
Here's my current code settings: https://github.com/OneOfOne/dotfiles/blob/master/.config/Code/User/settings.json#L105
The text was updated successfully, but these errors were encountered: