aboutsummaryrefslogtreecommitdiff
path: root/book/src/themes.md
diff options
context:
space:
mode:
Diffstat (limited to 'book/src/themes.md')
-rw-r--r--book/src/themes.md46
1 files changed, 41 insertions, 5 deletions
diff --git a/book/src/themes.md b/book/src/themes.md
index fd3f5b1e..9abcfe8c 100644
--- a/book/src/themes.md
+++ b/book/src/themes.md
@@ -1,14 +1,14 @@
# Themes
-First you'll need to place selected themes in your `themes` directory (i.e `~/.config/helix/themes`), the directory might have to be created beforehand.
+To use a theme add `theme = "<name>"` to your [`config.toml`](./configuration.md) at the very top of the file before the first section or select it during runtime using `:theme <name>`.
-To use a custom theme add `theme = <name>` to your [`config.toml`](./configuration.md) or override it during runtime using `:theme <name>`.
+## Creating a theme
-The default theme.toml can be found [here](https://github.com/helix-editor/helix/blob/master/theme.toml), and user submitted themes [here](https://github.com/helix-editor/helix/blob/master/runtime/themes).
+Create a file with the name of your theme as file name (i.e `mytheme.toml`) and place it in your `themes` directory (i.e `~/.config/helix/themes`). The directory might have to be created beforehand.
-## Creating a theme
+The names "default" and "base16_default" are reserved for the builtin themes and cannot be overridden by user defined themes.
-First create a file with the name of your theme as file name (i.e `mytheme.toml`) and place it in your `themes` directory (i.e `~/.config/helix/themes`).
+The default theme.toml can be found [here](https://github.com/helix-editor/helix/blob/master/theme.toml), and user submitted themes [here](https://github.com/helix-editor/helix/blob/master/runtime/themes).
Each line in the theme file is specified as below:
@@ -105,6 +105,7 @@ We use a similar set of scopes as
- `type` - Types
- `builtin` - Primitive types provided by the language (`int`, `usize`)
+- `constructor`
- `constant` (TODO: constant.other.placeholder for %v)
- `builtin` Special constants provided by the language (`true`, `false`, `nil` etc)
@@ -146,6 +147,7 @@ We use a similar set of scopes as
- `repeat` - `for`, `while`, `loop`
- `import` - `import`, `export`
- `return`
+ - `exception`
- `operator` - `or`, `in`
- `directive` - Preprocessor directives (`#if` in C)
- `function` - `fn`, `func`
@@ -162,10 +164,44 @@ We use a similar set of scopes as
- `namespace`
+- `markup`
+ - `heading`
+ - `list`
+ - `unnumbered`
+ - `numbered`
+ - `bold`
+ - `italic`
+ - `link`
+ - `url` - urls pointed to by links
+ - `label` - non-url link references
+ - `text` - url and image descriptions in links
+ - `quote`
+ - `raw`
+ - `inline`
+ - `block`
+
+- `diff` - version control changes
+ - `plus` - additions
+ - `minus` - deletions
+ - `delta` - modifications
+ - `moved` - renamed or moved files/changes
+
#### Interface
These scopes are used for theming the editor interface.
+- `markup`
+ - `normal`
+ - `completion` - for completion doc popup ui
+ - `hover` - for hover popup ui
+ - `heading`
+ - `completion` - for completion doc popup ui
+ - `hover` - for hover popup ui
+ - `raw`
+ - `inline`
+ - `completion` - for completion doc popup ui
+ - `hover` - for hover popup ui
+
| Key | Notes |
| --- | --- |