<p>Use a custom theme by placing a theme.toml in your config directory (i.e ~/.config/helix/theme.toml). The default theme.toml can be found <ahref="https://github.com/helix-editor/helix/blob/master/theme.toml">here</a>, and user submitted themes <ahref="https://github.com/helix-editor/helix/blob/master/contrib/themes">here</a>.</p>
<p>Styles in theme.toml are specified of in the form:</p>
<p>where <code>name</code> represents what you want to style, <code>fg</code> specifies the foreground color, <code>bg</code> the background color, and <code>modifiers</code> is a list of style modifiers. <code>bg</code> and <code>modifiers</code> can be omitted to defer to the defaults.</p>
<p>if the key contains a dot <code>'.'</code>, it must be quoted to prevent it being parsed as a <ahref="https://toml.io/en/v1.0.0#keys">dotted key</a>.</p>
<tr><td>label</td><td>used for lifetimes</td></tr>
<tr><td>module</td><td></td></tr>
<tr><td>ui.background</td><td></td></tr>
<tr><td>ui.linenr</td><td></td></tr>
<tr><td>ui.statusline</td><td></td></tr>
<tr><td>ui.popup</td><td></td></tr>
<tr><td>ui.window</td><td></td></tr>
<tr><td>ui.help</td><td></td></tr>
<tr><td>ui.text</td><td></td></tr>
<tr><td>ui.text.focus</td><td></td></tr>
<tr><td>ui.menu.selected</td><td></td></tr>
<tr><td>warning</td><td>LSP warning</td></tr>
<tr><td>error</td><td>LSP error</td></tr>
<tr><td>info</td><td>LSP info</td></tr>
<tr><td>hint</td><td>LSP hint</td></tr>
</tbody></table>
<p>These keys match <ahref="https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme">tree-sitter scopes</a>. We half-follow the common scopes from <ahref="https://macromates.com/manual/en/language_grammars">macromates language grammars</a> with some differences.</p>
<p>For a given highlight produced, styling will be determined based on the longest matching theme key. So it's enough to provide function to highlight <code>function.macro</code> and <code>function.builtin</code> as well, but you can use more specific scopes to highlight specific cases differently.</p>
<p>Use a custom theme by placing a theme.toml in your config directory (i.e ~/.config/helix/theme.toml). The default theme.toml can be found <ahref="https://github.com/helix-editor/helix/blob/master/theme.toml">here</a>, and user submitted themes <ahref="https://github.com/helix-editor/helix/blob/master/contrib/themes">here</a>.</p>
<p>Styles in theme.toml are specified of in the form:</p>
<p>where <code>name</code> represents what you want to style, <code>fg</code> specifies the foreground color, <code>bg</code> the background color, and <code>modifiers</code> is a list of style modifiers. <code>bg</code> and <code>modifiers</code> can be omitted to defer to the defaults.</p>
<p>if the key contains a dot <code>'.'</code>, it must be quoted to prevent it being parsed as a <ahref="https://toml.io/en/v1.0.0#keys">dotted key</a>.</p>
<tr><td>label</td><td>used for lifetimes</td></tr>
<tr><td>module</td><td></td></tr>
<tr><td>ui.background</td><td></td></tr>
<tr><td>ui.linenr</td><td></td></tr>
<tr><td>ui.statusline</td><td></td></tr>
<tr><td>ui.popup</td><td></td></tr>
<tr><td>ui.window</td><td></td></tr>
<tr><td>ui.help</td><td></td></tr>
<tr><td>ui.text</td><td></td></tr>
<tr><td>ui.text.focus</td><td></td></tr>
<tr><td>ui.menu.selected</td><td></td></tr>
<tr><td>warning</td><td>LSP warning</td></tr>
<tr><td>error</td><td>LSP error</td></tr>
<tr><td>info</td><td>LSP info</td></tr>
<tr><td>hint</td><td>LSP hint</td></tr>
</tbody></table>
<p>These keys match <ahref="https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme">tree-sitter scopes</a>. We half-follow the common scopes from <ahref="https://macromates.com/manual/en/language_grammars">macromates language grammars</a> with some differences.</p>
<p>For a given highlight produced, styling will be determined based on the longest matching theme key. So it's enough to provide function to highlight <code>function.macro</code> and <code>function.builtin</code> as well, but you can use more specific scopes to highlight specific cases differently.</p>