From 1af8dd9912d655cfc47979d40738ee4ebaa2521a Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 7 Jan 2022 19:14:31 +0100 Subject: Rework beginning of themes chapter The specifics of configuring themes has caused some confusion. Hopefully this will clarify things a little. --- book/src/themes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'book/src/themes.md') diff --git a/book/src/themes.md b/book/src/themes.md index 8eee334b..7474122f 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 = ""` to your [`config.toml`](./configuration.md) at the very top of the file before the first section or select it during runtime using `:theme `. -To use a custom theme add `theme = ` to your [`config.toml`](./configuration.md) or override it during runtime using `:theme `. +## 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: -- cgit v1.2.3-70-g09d2 From b799b0d50e7848cc084d913afbdc0fb3a25c1b97 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Sat, 8 Jan 2022 09:27:50 -0600 Subject: capture markdown link text as markup.link.text (#1456) --- book/src/themes.md | 5 +++-- runtime/queries/markdown/highlights.scm | 5 +++++ theme.toml | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'book/src/themes.md') diff --git a/book/src/themes.md b/book/src/themes.md index 7474122f..29d3926e 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -171,8 +171,9 @@ We use a similar set of scopes as - `bold` - `italic` - `link` - - `url` - - `label` + - `url` - urls pointed to by links + - `label` - non-url link references + - `text` - url and image descriptions in links - `quote` - `raw` - `inline` diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index a0bd3462..f12254e9 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -21,6 +21,11 @@ (link_destination) @markup.link.url (link_label) @markup.link.label +[ + (link_text) + (image_description) +] @markup.link.text + [ (list_marker_plus) (list_marker_minus) diff --git a/theme.toml b/theme.toml index ca0b2805..d2c1fc32 100644 --- a/theme.toml +++ b/theme.toml @@ -32,6 +32,7 @@ label = "honey" "markup.bold" = { modifiers = ["bold"] } "markup.italic" = { modifiers = ["italic"] } "markup.link.url" = { fg = "silver", modifiers = ["underlined"] } +"markup.link.text" = "almond" "markup.raw" = "almond" "diff.plus" = "#35bf86" -- cgit v1.2.3-70-g09d2 From 5b45bdd80f1b2bd456d247ed6d2d95e9efb9d304 Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Mon, 3 Jan 2022 20:31:17 -0600 Subject: docs: document @keyword.control.exception scope As identified in [this GitHub comment](https://github.com/helix-editor/helix/pull/1433#discussion_r777786140) --- book/src/themes.md | 1 + 1 file changed, 1 insertion(+) (limited to 'book/src/themes.md') diff --git a/book/src/themes.md b/book/src/themes.md index 29d3926e..1325de8c 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -147,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` -- cgit v1.2.3-70-g09d2