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 patch/diff file highlighting #516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SentientCoffee
Copy link
Contributor

Added patch/diff file highlighting for easy at a glance viewing.

Does not try to highlight based on language, just a simple green for additions and red for deletions, plus some extra colours for metadata.

(This could be changed in the future if we did want to highlight per language since the regions I added could stay the same and just change the token colours... That would involve needing to detect language based on the file extensions of the diff'd files though which might be kind of slow, especially for large patches that involve many files.)

@SentientCoffee
Copy link
Contributor Author

Forgot to update the unit tests and themes, whoops.

@obiwanus
Copy link
Collaborator

Thanks for the PR! Sorry @SentientCoffee, this patch will have to wait because if we merge it now we'll have to fix many conflicts with the long running branch which is blocking everything. In fact I wish you hadn't updated the config, tests and themes, because it would've been easier to add them later

@SentientCoffee
Copy link
Contributor Author

Is it just the default config/themes/tests that would cause an issue? I can revert those if needed, I updated them because otherwise jai first.jai - release fails the unit tests.

@focus-editor
Copy link
Owner

focus-editor commented Feb 14, 2025 via email

@SentientCoffee
Copy link
Contributor Author

Reverted the unit test and theme changes 👍🏻

@obiwanus
Copy link
Collaborator

Great, thanks. If you want a release build for yourself in the mean time, you can just disable tests temporarily.

Added patch/diff file highlighting for easy at a glance viewing.

Does not try to highlight based on language, just a simple green for additions
and red for deletions, plus some extra colours for metadata.

(This could be changed in the future if we did want to highlight per language
since the regions I added could stay the same and just change the token
colours... That would involve needing to detect language based on the file
extensions of the diff'd files though which might be kind of slow, especially
for large patches that involve many files.)
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.

3 participants