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: Highlighter Provider Diffing #291

Merged

Conversation

thecoolwinter
Copy link
Collaborator

Description

Adds the ability to add and remove highlighters after the view is initialized. This allows for highlighter objects to be lazily loaded and added to the editor by developers.

This uses the object identifier to uniquely identify highlighter objects. This has the nice side effect of if a new highlighter is provided with the same type as an old one, we'll correctly set it up.

This is required for lsp semantic highlights, as we can't load the semantic highlighter object until after the language server has loaded the document.

Adds tests for this new feature, including moving, adding, removing and random modifications.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

N/A

Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thecoolwinter thecoolwinter merged commit f51ed8e into CodeEditApp:main Jan 30, 2025
2 checks passed
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.

2 participants