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

Add a hotkey to re-trigger manual syntax recoloring after failing on autoformat #226

Closed
norru opened this issue Sep 26, 2019 · 16 comments
Closed

Comments

@norru
Copy link

norru commented Sep 26, 2019

eclipse-corrosion/corrosion#243 and #203 are still not fixed. I infer that they're either too low a priority, or too complex a fix.

Either case, it would reckon that they won't be fixed any time soon but the functionality is still required somehow.

The current workaround is to close an editor and reopen it after every autoformatting, which is too impractical to be used, and pretty much makes the in-editor autoformat pretty much useless.

In order to restore the auto-format functionality we need a workaround so a manual syntax re-coloring is triggered, either on demand (using a hotkey) or "appending" the functionality to the autoformat key.

@mickaelistria
Copy link
Contributor

A hotkey would be a workaround, development effort of anyone interested in and able to fix this would be more profitable if invested in actually fixing the issue.
I personally cannot manage to reproduce it in ~99% of cases. If I were able to reproduce it more easily, I'd gladly try to fix it.

@norru
Copy link
Author

norru commented Sep 26, 2019

It's now 100% for me in all my files, all my projects on all my machines, fast and slow. All Linux boxes (Ubuntu and Devuan).

The only common denominator is that they tend to be non-trivial projects (several klocs/crate, several 1klocs+ source .rs files).

@mickaelistria
Copy link
Contributor

Ok. can you please share such a big rust file you're using and always see it failing? Maybe that will good enough for me to reproduce it.

@norru
Copy link
Author

norru commented Sep 26, 2019

Just reproduced at first attempt on https://github.com/itadinanta/rust-oids/blob/master/src/backend/world/gen.rs, which is not even that large!

eclipse-corrosion/corrosion#243 (comment)

Toolchain nightly-2019-09-03-x86_64-unknown-linux-gnu on Ubuntu 18.04, Eclipse 2019--09 with snapshot Corrosion and dependencies.

@norru
Copy link
Author

norru commented Sep 26, 2019

If you manage to repro, feel free to close this bug and continue on #203 or eclipse-corrosion/corrosion#243.

If you don't, well, WTF 😜

@norru
Copy link
Author

norru commented Sep 26, 2019

If it helps, I also get this very often when the problem appears:

Selection_228

@mickaelistria
Copy link
Contributor

That popup is quite interesting, but it comes from the LS, not from TM4E.
So it's a different issue: the LS may send wrong messages or LSP4E fail at interpreting them properly, but TM4E should still be able to perform correct syntax highlighting independently of that.

@norru
Copy link
Author

norru commented Sep 26, 2019

The popup does not appear all the time, just often.

However, this kind of points to a data race if you ask me.

@PyvesB
Copy link
Contributor

PyvesB commented Sep 30, 2019

This happens to me every now and again, it's quite annoying. I'll keep an eye open and see if I can find a good reproducible example next time I bump into this.

@norru
Copy link
Author

norru commented Sep 30, 2019

@PyvesB If I had a way to make it happen every now and again rather than every single time, I'd be a happy bunny!

@norru
Copy link
Author

norru commented Jan 28, 2020

This is still a requirement. Workaround is still to close/reopen editor.

@mickaelistria
Copy link
Contributor

Fixing the bug is the requirement, implementing another workaround isn't ;)

@mickaelistria
Copy link
Contributor

To clarify, I'm closing this issue as I think it's not a desired resource allocation from project perspective.

@norru
Copy link
Author

norru commented Jan 29, 2020

Fair enough, but the bug is still a real pain in the neck! :)

@mickaelistria
Copy link
Contributor

I know, but I really fail at reproducing it. So whoever is more(?) lucky to reproduce it easily can give it a try to a fix. that would be very welcome!

@norru
Copy link
Author

norru commented Jan 29, 2020

I know, right? It's baffling that it can't be reproduced on your machine!

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

3 participants