anoma / vscode-juvix

VSCode extension for Juvix
https://marketplace.visualstudio.com/items?itemName=heliax.juvix-mode
GNU General Public License v3.0
3 stars 2 forks source link

Highlighting disappears while typing #44

Open lukaszcz opened 1 year ago

lukaszcz commented 1 year ago

When you start typing and you haven't yet finished writing correct code, all highlighting disappears, including of the already correct code typed earlier. This is very annoying.

jonaprieto commented 1 year ago

I need to investigate this. However, I had this issue and didn't find a solution.

lukaszcz commented 1 year ago

Maybe one solution would be for the highlighter to highlight all it can even if there is a syntax error? But this probably requires significant changes in the Juvix highlighter.

lukaszcz commented 1 year ago

But this is a bug. It's very annoying to use the VSCode extension because of this. It should be fixed one way or another.

But somehow it didn't happen with an earlier version, so something changed.

jonaprieto commented 1 year ago

Can you please track the version where it's supposed to be working?

lukaszcz commented 1 year ago

Well, it doesn't seem to be working with any of the extension versions. Maybe the VSCode version changed or something changed in the juvix binary. Or I just misremembered this.

lukaszcz commented 1 year ago

In any case, I would say this is the most serious issue with the VSCode extension as of now.

lukaszcz commented 1 year ago

A solution might be not to update the highlighting if there is an error, but use the old highlighting if there is one?

lukaszcz commented 1 year ago

My take on this is that if we can't easily have non-disappearing semantic highlighting, then it's better to have dumb highlighting like we currently have with JuvixCore and JuvixAsm.

lukaszcz commented 1 year ago

This is partly solved in 0.1.39. Semantic highlighting still disappears while I'm typing after the position where I'm typing. If I make an error, depending on the kind of error, all semantic highlighting in the entire file may disappear, plus basic highlighting after the error point.

Ultimately, highlighting shouldn't disappear. It should behave more-or-less the way the Haskell extension behaves, where I guess the extension remembers things that were highlighted - at least that's how it looks from the user perspective.

lukaszcz commented 1 year ago
image
lukaszcz commented 1 year ago
image
lukaszcz commented 1 year ago

Original state before editing:

image