Comments (12)
I need to investigate this. However, I had this issue and didn't find a solution.
- https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide
- https://github.com/dotnet/interactive/blob/main/src/polyglot-notebooks-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts
from vscode-juvix.
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.
from vscode-juvix.
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.
from vscode-juvix.
Can you please track the version where it's supposed to be working?
from vscode-juvix.
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.
from vscode-juvix.
In any case, I would say this is the most serious issue with the VSCode extension as of now.
from vscode-juvix.
A solution might be not to update the highlighting if there is an error, but use the old highlighting if there is one?
from vscode-juvix.
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.
from vscode-juvix.
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.
from vscode-juvix.
![image](https://private-user-images.githubusercontent.com/62751/240926802-318350be-a65b-4b48-9f4b-d272e1befdb9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3MzYwMjcsIm5iZiI6MTcyMzczNTcyNywicGF0aCI6Ii82Mjc1MS8yNDA5MjY4MDItMzE4MzUwYmUtYTY1Yi00YjQ4LTlmNGItZDI3MmUxYmVmZGI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC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NjhkMmFkYjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Ln6mU1XheU8IOhDYX-4U3TxmKwCaxcZXR5qKqKlANTs)
from vscode-juvix.
Original state before editing:
from vscode-juvix.
Related Issues (20)
- "Insert module" inserts module name with a dot at the front HOT 1
- Textmate scope highlight args as comments
- Suddenly things started getting italic for no reason HOT 1
- The choice of color for constructors is poor in the dark mode HOT 2
- The highlighting colors in the source and the REPL don't match HOT 2
- Version in the status bar never gets updated during a session
- Shell environment is not refreshed after Juvix is installed (so the juvix binary is not found)
- Add Vamp-IR tasks
- Check and install VampIR binaries HOT 2
- Code disappears after formatting an already formatted file HOT 3
- Matching parens should be highlighted
- Add VampIR REPL
- Type checking fails after deleting .juvix-build folder
- Identifiers are sometimes incorrectly labelled
- Update Juvix grammar to support 0.5.0
- Extension causes high cpu load HOT 2
- Adapt to the new CLI compile command syntax
- The pop-up for function identifiers should show the type of the identifier
- Typecheck and compile functionality fails
- Remove references to `--only-errors` flag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-juvix.