From 2244a5d40c83d477839f91cb6d6a4aeb02446a97 Mon Sep 17 00:00:00 2001 From: omentic Date: Wed, 1 May 2024 23:29:52 +0000 Subject: deploy: 12eec890240a05d1e090114f7f4fdd7c1ee8ff88 --- themes.html | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'themes.html') diff --git a/themes.html b/themes.html index 989fd87b..06fcfcf0 100644 --- a/themes.html +++ b/themes.html @@ -180,23 +180,23 @@

Themes

-

To use a theme add theme = "<name>" to the top of your config.toml file, or select it during runtime using :theme <name>.

+

To use a theme add theme = "<name>" to the top of your config.toml file, or select it during runtime using :theme <name>.

Creating a theme

Create a file with the name of your theme as the file name (i.e mytheme.toml) and place it in your themes directory (i.e ~/.config/helix/themes or %AppData%\helix\themes on Windows). The directory might have to be created beforehand.

-

💡 The names "default" and "base16_default" are reserved for built-in themes +

💡 The names "default" and "base16_default" are reserved for built-in themes and cannot be overridden by user-defined themes.

Overview

Each line in the theme file is specified as below:

-
key = { fg = "#ffffff", bg = "#000000", underline = { color = "#ff0000", style = "curl"}, modifiers = ["bold", "italic"] }
+
key = { fg = "#ffffff", bg = "#000000", underline = { color = "#ff0000", style = "curl"}, modifiers = ["bold", "italic"] }
 

Where key represents what you want to style, fg specifies the foreground color, bg the background color, underline the underline style/color, and modifiers is a list of style modifiers. bg, underline and modifiers can be omitted to defer to the defaults.

To specify only the foreground color:

-
key = "#ffffff"
+
key = "#ffffff"
 

If the key contains a dot '.', it must be quoted to prevent it being parsed as a dotted key.

-
"key.key" = "#ffffff"
+
"key.key" = "#ffffff"
 

For inspiration, you can find the default theme.toml here and @@ -211,12 +211,12 @@ user-submitted themes

It's recommended to define a palette of named colors, and refer to them in the configuration values in your theme. To do this, add a table called palette to your theme file:

-
"ui.background" = "white"
-"ui.text" = "black"
+
"ui.background" = "white"
+"ui.text" = "black"
 
 [palette]
-white = "#ffffff"
-black = "#000000"
+white = "#ffffff"
+black = "#000000"
 

Keep in mind that the [palette] table includes all keys after its header, so it should be defined after the normal theme options.

@@ -260,7 +260,7 @@ your terminal emulator.

💡 The underlined modifier is deprecated and only available for backwards compatibility. -Its behavior is equivalent to setting underline.style="line".

+Its behavior is equivalent to setting underline.style="line".

Underline style

One of the following values may be used as a value for underline.style, providing it is @@ -275,19 +275,19 @@ supported by your terminal emulator.

Inheritance

Extend other themes by setting the inherits property to an existing theme.

-
inherits = "boo_berry"
+
inherits = "boo_berry"
 
-# Override the theming for "keyword"s:
-"keyword" = { fg = "gold" }
+# Override the theming for "keyword"s:
+"keyword" = { fg = "gold" }
 
 # Override colors in the palette:
 [palette]
-berry = "#2A2A4D"
+berry = "#2A2A4D"
 

Rainbow

The rainbow key is used for rainbow highlight for matching brackets. The key is a list of styles.

-
rainbow = ["#ff0000", "#ffa500", "#fff000", { fg = "#00ff00", modifiers = ["bold"] }]
+
rainbow = ["#ff0000", "#ffa500", "#fff000", { fg = "#00ff00", modifiers = ["bold"] }]
 

Colors from the palette and modifiers may be used.

Scopes

@@ -306,6 +306,7 @@ The key is a list of styles.

type - Types

  • builtin - Primitive types provided by the language (int, usize)
  • +
  • parameter - Generic type parameters (T)
  • enum
    • variant
    • @@ -544,11 +545,14 @@ The key is a list of styles.

      ui.statusline.insertStatusline mode during insert mode (only if editor.color-modes is enabled) ui.statusline.selectStatusline mode during select mode (only if editor.color-modes is enabled) ui.statusline.separatorSeparator character in statusline +ui.bufferlineStyle for the buffer line +ui.bufferline.activeStyle for the active buffer in buffer line +ui.bufferline.backgroundStyle for bufferline background ui.popupDocumentation popups (e.g. Space + k) ui.popup.infoPrompt for multiple key options ui.windowBorderlines separating splits ui.helpDescription box for commands -ui.textCommand prompts, popup text, etc. +ui.textDefault text style, command prompts, popup text, etc. ui.text.focusThe currently selected line in the picker ui.text.inactiveSame as ui.text but when the text is inactive (e.g. suggestions) ui.text.infoThe key: command text in ui.popup.info boxes @@ -559,6 +563,7 @@ The key is a list of styles.

      ui.virtual.inlay-hint.parameterStyle for inlay hints of kind parameter (LSPs are not required to set a kind) ui.virtual.inlay-hint.typeStyle for inlay hints of kind type (LSPs are not required to set a kind) ui.virtual.wrapSoft-wrap indicator (see the editor.soft-wrap config) +ui.virtual.jump-labelStyle for virtual jump labels ui.menuCode and command completion menus ui.menu.selectedSelected autocomplete item ui.menu.scrollfg sets thumb color, bg sets track color of scrollbar @@ -578,6 +583,8 @@ The key is a list of styles.

      diagnostic.infoDiagnostics info (editing area) diagnostic.warningDiagnostics warning (editing area) diagnostic.errorDiagnostics error (editing area) +diagnostic.unnecessaryDiagnostics with unnecessary tag (editing area) +diagnostic.deprecatedDiagnostics with deprecated tag (editing area) -- cgit v1.2.3-70-g09d2