You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: THEMES.md
+29-3
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
default on light terminal:
4
4

5
5
6
+
## Configuration
7
+
6
8
To change the colors of the default theme you need to add a `theme.ron` file that contains the colors you want to override. Note that you don’t have to specify the full theme anymore (as of 0.23). Instead, it is sufficient to override just the values that you want to differ from their default values.
7
9
8
10
The file uses the [Ron format](https://github.com/ron-rs/ron) and is located at one of the following paths, depending on your operating system:
@@ -16,7 +18,7 @@ Alternatively, you can create a theme in the same directory mentioned above and
16
18
17
19
Example theme override:
18
20
19
-
```
21
+
```ron
20
22
(
21
23
selection_bg: Some("Blue"),
22
24
selection_fg: Some("#ffffff"),
@@ -32,19 +34,43 @@ Notes:
32
34
* valid colors can be found in ratatui's [Color](https://docs.rs/ratatui/latest/ratatui/style/enum.Color.html) struct.
33
35
* 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)
34
36
37
+
## Preset Themes
38
+
39
+
You can find preset themes by Catppuccin [here](https://github.com/catppuccin/gitui.git).
40
+
41
+
## Syntax Highlighting
42
+
43
+
The syntax highlighting theme can be defined using the element `syntax`. Both [default themes of the syntect library](https://github.com/trishume/syntect/blob/7fe13c0fd53cdfa0f9fea1aa14c5ba37f81d8b71/src/dumps.rs#L215) and custom themes are supported.
44
+
45
+
Example syntax theme:
46
+
```ron
47
+
(
48
+
syntax: Some("InspiredGitHub"),
49
+
)
50
+
```
51
+
52
+
Custom themes are located in the [configuration directory](#configuration), are using TextMate's theme format and must have a `.tmTheme` file extension. To load a custom theme, `syntax` must be set to the file name without the file extension. For example, to load [`Blackboard.tmTheme`](https://raw.githubusercontent.com/filmgirl/TextMate-Themes/refs/heads/master/Blackboard.tmTheme), place the file next to `theme.ron` and set:
53
+
```ron
54
+
(
55
+
syntax: Some("Blackboard"),
56
+
)
57
+
```
58
+
59
+
[filmgirl/TextMate-Themes](https://github.com/filmgirl/TextMate-Themes) offers many [beautiful](https://inkdeep.github.io/TextMate-Themes) TextMate themes to choose from.
60
+
35
61
## Customizing line breaks
36
62
37
63
If you want to change how the line break is displayed in the diff, you can also specify `line_break` in your `theme.ron`:
38
64
39
-
```
65
+
```ron
40
66
(
41
67
line_break: Some("¶"),
42
68
)
43
69
```
44
70
45
71
Note that if you want to turn it off, you should use a blank string:
0 commit comments