-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Support loading custom syntax themes from a file #2565
Support loading custom syntax themes from a file #2565
Conversation
All tests are running fine for me, I'm not sure why the CI is failing. |
I don't have a solution, but if you want to reproduce, just make sure your gitui config directory does not exist when you run the tests. If you're on Linux, run |
I'd wager you've already found it yourself, but just in case you haven't: You removed |
Thank you, that was it. |
The linter failure regarding duplicate deps probably also does not require an exception, as this should be history once we upgrade to ron 0.9. |
@naseschwarz If thats the last thing here, then lets add a cargo-deny exception in the meantime, merge this, create a followup linking to the upstream issue to remember to clean this up once Ron 0.9 is out? |
I found a better way of doing this - it's possible to load themes from the config directory into the default |
nice ron 0.9 just landed aswell |
@extrawurst: I have not actually reviewed this, as I was not under the impression that this is ready for review. My remarks were purely in answer to the question about CI failure. |
ThemeSet::add_from_folder reads the entire directory, including files that aren't required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked at this in detail now and find this all quite nicely done.
I've tested this, including error cases I could identify, and found everything working as I would have expected.
We only need to consolidate this with #2570, but I suggest to do this separately.
Awesome! Thank you |
This Pull Request fixes/closes #2523 & closes #2308.
Custom syntax highlighting themes can be loaded from a
.tmTheme
file.If
syntax
intheme.ron
(added in #2532) is a filename that exists in the gitui config directory, it's used as the syntax theme. If not, gitui falls back to selecting from the default theme set.For example, if you put the following in
theme.ron
:gitui will load
~/.config/gitui/mytheme.tmTheme
.I followed the checklist:
make check
without errorsmake check
reports a duplicate dependency error: