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

feat: partially implement semantic highlight #36

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rszyma
Copy link
Owner

@rszyma rszyma commented Jun 10, 2024

Describe the changes and why are you making them

Closes: #34

Checklist

  • Update CHANGELOG.md

@rszyma rszyma force-pushed the semantic-highlight branch from ee7d2f7 to a4cbf91 Compare June 10, 2024 00:47
@rszyma
Copy link
Owner Author

rszyma commented Jun 10, 2024

todo:

  • fix semantic highlight not working the first time it's activated (race condition, need to wait for files to load first)
  • make this feature optional, opt-in for the time being, becuase this is not a full semantic highlight. For example numbers in actions e.g. in one-shot still don't get highlighted properly. Also it stops working when there's an error in config, disappearing coloring might be annoying.
  • fix this bug - probably something wrong with unicode handling
    image

@rszyma rszyma changed the title refactor: move server init params to rust feat: semantic highlight Jun 10, 2024
@rszyma rszyma changed the title feat: semantic highlight feat: (partial) semantic highlight Jun 10, 2024
@rszyma rszyma changed the title feat: (partial) semantic highlight feat: partial semantic highlight Jun 10, 2024
disabled by default and marked as expermental, because of bugs
@rszyma rszyma changed the title feat: partial semantic highlight feat: partially implement semantic highlight Jun 10, 2024
@rszyma rszyma marked this pull request as draft October 13, 2024 23:14
@rszyma
Copy link
Owner Author

rszyma commented Dec 25, 2024

I kinda dropped the idea of semantic highlighting hugely because tokens flashing with different colors on and off because of error kicking in when typing something. One idea to remove this flashing entirely is to attach semantic highlighting info to parsed tree and given that majority of nodes don't change semantics when typing, it would be pretty reasonable to reuse same semantic highlighting for the same nodes while until parser error is gone. Idk how doable would that be thought.

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

Successfully merging this pull request may close these issues.

feature: semantic highlighting
1 participant