Skip to content

Add doc for syntax in THEMES.md #2570

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

Closed

Conversation

VasilisManol
Copy link
Contributor

@VasilisManol VasilisManol commented Mar 18, 2025

This Pull Request fixes/closes #2532 (comment)

It changes the following:
Adds documentation for syntax in THEMES.md

I followed the checklist:
- [ ] I added unittests
[x] I ran make check without errors
- [ ] I tested the overall application
- [ ] I added an appropriate item to the changelog

Copy link
Contributor

@naseschwarz naseschwarz left a comment

Choose a reason for hiding this comment

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

Hi. I've quickly checked that the example works. It does. I have two minor nitpicks:

THEMES.md Outdated
Example syntax theme:
```
(
syntax : Some("InspiredGitHub"),
Copy link
Contributor

Choose a reason for hiding this comment

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

RON'd roundtrip this like

Suggested change
syntax : Some("InspiredGitHub"),
syntax: Some("InspiredGitHub"),

THEMES.md Outdated
@@ -31,7 +31,14 @@ Notes:
* using a color like `yellow` might appear in whatever your terminal/theme defines for `yellow`
* valid colors can be found in ratatui's [Color](https://docs.rs/ratatui/latest/ratatui/style/enum.Color.html) struct.
* all customizable theme elements can be found in [`style.rs` in the `impl Default for Theme` block](https://github.com/gitui-org/gitui/blob/master/src/ui/style.rs#L305)
* the syntax highlighting theme can be defined using the element `syntax`. Currently, only default themes of the syntect library are supported, [available themes](https://github.com/trishume/syntect/blob/7fe13c0fd53cdfa0f9fea1aa14c5ba37f81d8b71/src/dumps.rs#L215).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* the syntax highlighting theme can be defined using the element `syntax`. Currently, only default themes of the syntect library are supported, [available themes](https://github.com/trishume/syntect/blob/7fe13c0fd53cdfa0f9fea1aa14c5ba37f81d8b71/src/dumps.rs#L215).
* the syntax highlighting theme can be defined using the element `syntax`. Currently, only [default themes of the syntect library are supported](https://github.com/trishume/syntect/blob/7fe13c0fd53cdfa0f9fea1aa14c5ba37f81d8b71/src/dumps.rs#L215).

@naseschwarz
Copy link
Contributor

This was merged via #2575.

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