Merge branch 'helix-editor:master' into master

pull/13448/head
Nikola Milenkovic 2025-07-02 13:35:55 +02:00 committed by GitHub
commit 34c45994f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 596 additions and 40 deletions

4
Cargo.lock generated
View File

@ -1864,9 +1864,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.9.0"
version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
dependencies = [
"equivalent",
"hashbrown 0.15.4",

View File

@ -49,6 +49,8 @@ The following variables are supported:
| `line_ending` | A string containing the line ending of the currently focused document. For example on Unix systems this is usually a line-feed character (`\n`) but on Windows systems this may be a carriage-return plus a line-feed (`\r\n`). The line ending kind of the currently focused document can be inspected with the `:line-ending` command. |
| `language` | A string containing the language name of the currently focused document.|
| `selection` | A string containing the contents of the primary selection of the currently focused document. |
| `selection_line_start` | The line number of the start of the primary selection in the currently focused document, starting at 1. |
| `selection_line_end` | The line number of the end of the primary selection in the currently focused document, starting at 1. |
Aside from editor variables, the following expansions may be used:

View File

@ -18,6 +18,7 @@
| c | ✓ | ✓ | ✓ | `clangd` |
| c-sharp | ✓ | ✓ | | `OmniSharp` |
| cabal | | | | `haskell-language-server-wrapper` |
| caddyfile | ✓ | ✓ | ✓ | |
| cairo | ✓ | ✓ | ✓ | `cairo-language-server` |
| capnp | ✓ | | ✓ | |
| cel | ✓ | | | |

View File

@ -81,7 +81,7 @@
| `:log-open` | Open the helix log file. |
| `:insert-output` | Run shell command, inserting output before each selection. |
| `:append-output` | Run shell command, appending output after each selection. |
| `:pipe`, `:|` | Pipe each selection to the shell command. |
| `:pipe`, `:\|` | Pipe each selection to the shell command. |
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
| `:run-shell-command`, `:sh`, `:!` | Run a shell command |
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. |

View File

@ -61,7 +61,7 @@ tokio-stream = "0.1"
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
arc-swap = { version = "1.7.1" }
termini = "1"
indexmap = "2.9"
indexmap = "2.10"
# Logging
fern = "0.7"

View File

@ -401,6 +401,8 @@ impl Application {
// Re-parse any open documents with the new language config.
let lang_loader = self.editor.syn_loader.load();
for document in self.editor.documents.values_mut() {
// Re-detect .editorconfig
document.detect_editor_config();
document.detect_language(&lang_loader);
let diagnostics = Editor::doc_diagnostics(
&self.editor.language_servers,

View File

@ -6738,6 +6738,10 @@ fn jump_to_word(cx: &mut Context, behaviour: Movement) {
// Calculate the jump candidates: ranges for any visible words with two or
// more characters.
let alphabet = &cx.editor.config().jump_label_alphabet;
if alphabet.is_empty() {
return;
}
let jump_label_limit = alphabet.len() * alphabet.len();
let mut words = Vec::with_capacity(jump_label_limit);
let (view, doc) = current_ref!(cx.editor);

View File

@ -807,7 +807,9 @@ pub fn code_action(cx: &mut Context) {
});
picker.move_down(); // pre-select the first item
let popup = Popup::new("code-action", picker).with_scrollbar(false);
let popup = Popup::new("code-action", picker)
.with_scrollbar(false)
.auto_close(true);
compositor.replace_or_push("code-action", popup);
};

View File

@ -10,7 +10,7 @@
//! These types form a hierarchy: [`Spans`] is a collection of [`Span`] and each line of [`Text`]
//! is a [`Spans`].
//!
//! Keep it mind that a lot of widgets will use those types to advertise what kind of string is
//! Keep in mind that a lot of widgets will use those types to advertise what kind of string is
//! supported for their properties. Moreover, `tui` provides convenient `From` implementations so
//! that you can start by using simple `String` or `&str` and then promote them to the previous
//! primitives when you need additional styling capabilities.

View File

@ -1172,7 +1172,7 @@ impl Document {
}
}
pub(crate) fn detect_editor_config(&mut self) {
pub fn detect_editor_config(&mut self) {
if self.config.load().editor_config {
if let Some(path) = self.path.as_ref() {
self.editor_config = EditorConfig::find(path);

View File

@ -37,6 +37,10 @@ pub enum Variable {
Language,
// Primary selection
Selection,
// The one-indexed line number of the start of the primary selection in the currently focused document.
SelectionLineStart,
// The one-indexed line number of the end of the primary selection in the currently focused document.
SelectionLineEnd,
}
impl Variable {
@ -47,6 +51,8 @@ impl Variable {
Self::LineEnding,
Self::Language,
Self::Selection,
Self::SelectionLineStart,
Self::SelectionLineEnd,
];
pub const fn as_str(&self) -> &'static str {
@ -57,6 +63,8 @@ impl Variable {
Self::LineEnding => "line_ending",
Self::Language => "language",
Self::Selection => "selection",
Self::SelectionLineStart => "selection_line_start",
Self::SelectionLineEnd => "selection_line_end",
}
}
@ -68,6 +76,8 @@ impl Variable {
"line_ending" => Some(Self::LineEnding),
"language" => Some(Self::Language),
"selection" => Some(Self::Selection),
"selection_line_start" => Some(Self::SelectionLineStart),
"selection_line_end" => Some(Self::SelectionLineEnd),
_ => None,
}
}
@ -232,5 +242,13 @@ fn expand_variable(editor: &Editor, variable: Variable) -> Result<Cow<'static, s
Variable::Selection => Ok(Cow::Owned(
doc.selection(view.id).primary().fragment(text).to_string(),
)),
Variable::SelectionLineStart => {
let start_line = doc.selection(view.id).primary().line_range(text).0;
Ok(Cow::Owned((start_line + 1).to_string()))
}
Variable::SelectionLineEnd => {
let end_line = doc.selection(view.id).primary().line_range(text).1;
Ok(Cow::Owned((end_line + 1).to_string()))
}
}
}

View File

@ -1424,6 +1424,7 @@ file-types = [
{ glob = ".clangd" },
{ glob = ".clang-format" },
{ glob = ".clang-tidy" },
{ glob = ".gem/credentials" },
"sublime-syntax"
]
comment-token = "#"
@ -1858,13 +1859,14 @@ name = "git-commit"
scope = "git.commitmsg"
file-types = [{ glob = "COMMIT_EDITMSG" }, { glob = "MERGE_MSG" }]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
indent = { tab-width = 4, unit = " " }
rulers = [51, 73]
text-width = 72
grammar = "gitcommit"
[[grammar]]
name = "git-commit"
source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "6f193a66e9aa872760823dff020960c6cedc37b3" }
name = "gitcommit"
source = { git = "https://github.com/gbprod/tree-sitter-gitcommit", rev = "a716678c0f00645fed1e6f1d0eb221481dbd6f6d" }
[[language]]
name = "diff"
@ -2961,6 +2963,7 @@ file-types = [
"service",
"automount",
"desktop",
{ glob = "mimeapps.list" },
"device",
"mount",
"nspawn",
@ -4433,3 +4436,17 @@ language-servers = [ "luau" ]
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "ec187cafba510cddac265329ca7831ec6f3b9955" }
[[language]]
name = "caddyfile"
scope = "source.caddyfile"
injection-regex = "caddyfile"
file-types = [{ glob = "Caddyfile" }]
comment-tokens = ["#"]
indent = { tab-width = 4, unit = " " }
formatter = { command = "caddy", args = ["fmt", "-"] }
auto-format = true
[[grammar]]
name = "caddyfile"
source = { git = "https://github.com/caddyserver/tree-sitter-caddyfile", rev = "b04bdb4ec53e40c44afbf001e15540f60a296aef" }

View File

@ -0,0 +1,72 @@
(comment) @comment
[
(environment_variable)
(placeholder)
] @constant
[
(network_address)
(ip_address_or_cidr)
] @string.special.url
(path) @string.special.path
[
(snippet_name)
(named_route_identifier)
(site_address)
] @keyword
(directive (directive_name) @variable.other.member)
; declaration of a named matcher
(named_matcher (matcher_identifier (matcher_name)) @function.macro)
; reference to a named matcher
(matcher (matcher_identifier (matcher_name)) @function.macro)
; directive within a named matcher declaration
(matcher_directive (matcher_directive_name) @function.method)
; any other matcher (wildcard and path)
(matcher) @function.macro
[
(interpreted_string_literal)
(raw_string_literal)
(heredoc)
(cel_expression)
] @string
(escape_sequence) @constant.character.escape
[
(duration_literal)
(int_literal)
] @constant.numeric
[
"{"
"}"
] @punctuation.bracket
(global_options
(directive) @keyword.directive)
(directive
name: (directive_name)
(argument) @type)
; matches directive arguments that looks like an absolute path
; e.g.
; log {
; output file /var/log/caddy.log
; }
(directive
(argument) @string.special.path
(#match? @string.special.path "^/"))
((argument) @constant.builtin.boolean
(#any-of? @constant.builtin.boolean "on" "off"))
((argument) @type.enum.variant
(#any-of? @type.enum.variant "tcp" "udp" "ipv4" "ipv6"))

View File

@ -0,0 +1,8 @@
[
(block)
(matcher_block)
] @indent
((global_options) @indent)
"}" @outdent

View File

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))

View File

@ -0,0 +1,5 @@
(block) @local.scope
(named_matcher (matcher_identifier (matcher_name)) @local.definition.function.macro)
(matcher) @local.reference

View File

@ -0,0 +1,16 @@
(comment) @comment.inside
(comment)+ @comment.around
(directive
name: (directive_name) @parameter.inside) @parameter.around
(global_options
"{" (_)* @class.inside "}") @class.around
(snippet_definition
(block) @class.inside) @class.around
(named_route
(block) @class.inside) @class.around
(site_definition (block) @class.inside) @class.around

View File

@ -1,6 +1,16 @@
((comment) @injection.content
(#set! injection.language "comment"))
([(shell_command) (shell_fragment)] @injection.content
(#set! injection.language "bash"))
((shell_command (shell_fragment) @injection.content)
(#set! injection.language "bash")
(#set! injection.combined))
((run_instruction
(heredoc_block (heredoc_line) @injection.content . "\n" @injection.content))
(#set! injection.language "bash")
(#set! injection.combined))
((copy_instruction
(path (heredoc_marker)) . (path) @injection.filename
(heredoc_block (heredoc_line) @injection.content . "\n" @injection.content))
(#set! injection.combined))

View File

@ -1,6 +1,11 @@
; Most primitive nodes
(shebang) @keyword.directive
[
(symbol)
(symbol_binding)
] @variable
(comment) @comment
(fn_form
@ -186,8 +191,3 @@
(string)
(string_binding)
] @string
[
(symbol)
(symbol_binding)
] @variable

View File

@ -1,18 +1,18 @@
[(comment) (generated_comment) (scissor)] @comment
(subject) @markup.heading
(path) @string.special.path
(branch) @string.special.symbol
(commit) @constant
(item) @markup.link.url
(header) @tag
(filepath) @string.special.path
(arrow) @punctuation.delimiter
(subject (subject_prefix) @function)
(prefix (type) @keyword)
(prefix (scope) @variable.parameter)
(prefix [ "(" ")" ":" ] @punctuation.delimiter)
(prefix "!" @punctuation.special)
(trailer (token) @variable.other.member)
(trailer (value) @string)
(breaking_change (token) @special)
(change kind: "new file" @diff.plus)
(change kind: "deleted" @diff.minus)
(change kind: "modified" @diff.delta)
(change kind: "renamed" @diff.delta.moved)
(trailer
key: (trailer_key) @variable.other.member
value: (trailer_value) @string)
[":" "=" "->" (scissors)] @punctuation.delimiter
(comment) @comment
(change kind: (new)) @diff.plus
(change kind: (deleted)) @diff.minus
(change kind: (modified)) @diff.delta
(change kind: [(renamed) (typechange)]) @diff.delta.moved

View File

@ -1,6 +1,4 @@
(((scissors)
(message) @injection.content)
(#set! injection.include-children)
((diff) @injection.content
(#set! injection.language "diff"))
((rebase_command) @injection.content

View File

@ -180,9 +180,10 @@
[
(interpreted_string_literal)
(raw_string_literal)
(rune_literal)
] @string
(rune_literal) @constant.character
(escape_sequence) @constant.character.escape
[

View File

@ -1,6 +1,33 @@
((comment) @injection.content
(#set! injection.language "comment"))
; Inject markdown into documentation comments
;
; Go's comments are documentation comments when they are directly followed
; by one of Go's statements (e.g. `type`, `func`, `const`)
;
; This is only a partial implementation, which covers only
; block comments. For line comments (which are more common),
; upstream changes to the grammar are required.
(
(comment) @injection.content . (comment)* . [
(package_clause) ; `package`
(type_declaration) ; `type`
(method_declaration) ; `func`
(var_declaration) ; `var`
(const_declaration) ; `const`
; var (
; A = 1
; B = 2
; )
(const_spec)
; const (
; A = 1
; B = 2
; )
(var_spec)
]
(#set! injection.language "markdown"))
(call_expression
(selector_expression) @_function

View File

@ -255,4 +255,18 @@
(#set! injection.combined))
((indented_string_expression (string_fragment) @injection.shebang @injection.content)
(#set! injection.combined))
(#set! injection.combined))
; string contents of lib.literalExpression is nix code
((apply_expression
function: [
(select_expression) ; `lib.literalExpression`
(variable_expression) ; `literalExpression` this is the case when the symbol is brougth into scope e.g. `let inherit (lib) literalExpression; in`
] @_func
argument: [
(indented_string_expression (string_fragment) @injection.content) ; lib.literalExpression ''...''
(string_expression (string_fragment) @injection.content) ; lib.literalExpression "..."
])
(#any-of? @_func "lib.literalExpression" "literalExpression")
(#set! injection.language "nix")
(#set! injection.combined))

View File

@ -14,8 +14,10 @@
; Definitions
(parameter
pattern: (identifier) @local.definition.variable.parameter)
(function_item
(parameters
(parameter
pattern: (identifier) @local.definition.variable.parameter)))
(closure_parameters (identifier) @local.definition.variable.parameter)

View File

@ -0,0 +1,114 @@
# Dark Synthwave
# Based on Dark SynthWave '84 for VS Code (https://github.com/brainomite/dark-synthwave-vscode/tree/main)
#
# Author : Peter Retzlaff <pe.retzlaff@gmail.com>
# License: MIT License
# UI Colors
"ui.background" = { bg = "black", fg = "blood-red" }
"ui.cursor" = { fg = "white", modifiers = ["reversed"] }
"ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] }
"ui.cursor.match" = { bg = "selection-blue" }
"ui.text" = "white"
"ui.text.focus" = { fg = "dark-grey", bg = "synth-red" }
"ui.text.inactive" = "grey"
"ui.linenr" = "grey"
"ui.linenr.selected" = "white"
"ui.statusline" = { fg = "white", bg = "black" }
"ui.statusline.inactive" = { fg = "grey", bg = "black"}
"ui.statusline.separator" = "synth-red"
"ui.popup" = { fg = "#f8f8f0", bg = "#1E1E1E" }
"ui.popup.info" = { fg = "synth-red", bg = "black" }
"ui.window" = "synth-red"
"ui.help" = { fg = "#f8f8f0", bg = "#1E1E1E" }
"ui.virtual.jump-label" = {fg = "synth-red", modifiers = ["bold"]}
"ui.selection" = { bg = "selection-blue" }
"ui.selection.primary" = { bg = "selection-blue" }
"ui.menu" = { fg = "white", bg = "black" }
"ui.menu.selected" = { fg = "dark-grey", bg = "synth-red" }
"ui.picker" = { fg = "neon-yellow" }
"ui.picker.header.column.active" = { modifiers = ["bold"] }
"ui.background.separator" = "synth-red"
# Diagnostic colors
"warning" = "warning"
"error" = "error"
"info" = "info"
"hint" = "info"
"diagnostic.warning" = { underline = { color = "warning", style = "curl" } }
"diagnostic.error" = { underline = { color = "error", style = "curl" } }
"diagnostic.info" = { underline = { color = "info", style = "curl" } }
"diagnostic.hint" = { underline = { color = "info", style = "curl" } }
# Syntax highlighting
"comment" = { fg = "mauve", modifiers = ["italic"] }
"constant" = "salmon"
"constant.numeric" = "salmon"
"constant.character.escape" = "beaming-blue"
"constant.builtin" = "synthetic-green"
"constant.builtin.boolean" = "synthetic-green"
"string" = "orange"
"string.regexp" = "salmon"
"variable" = "pelati-red"
"variable.builtin" = { fg = "blood-red", modifiers = ["bold"] }
"variable.parameter" = { fg = "jess-green", modifiers = ["italic"] }
"type" = "blood-red"
"constructor" = "blood-red"
"function" = "beaming-blue"
"keyword" = "neon-yellow"
"keyword.control" = "neon-yellow"
"keyword.control.import" = "jade"
"keyword.operator" = "neon-yellow"
"keyword.directive" = "jade"
"keyword.storage.type" = "neon-yellow"
"keyword.storage.modifier" = "neon-yellow"
# "label" = "neon-yellow"
"namespace" = "blood-red"
"operator" = "neon-yellow"
# "special" = "beaming-blue"
"punctuation.bracket" = "neon-yellow"
"tag" = "jade"
"attribute" = { fg = "neon-yellow", modifiers = ["italic"] }
"markup.heading" = { fg = "#ff7edb", modifiers = ["bold"] }
"markup.bold" = { fg = "#2ee2fa", modifiers = ["bold"] }
"markup.italic" = { fg = "#2ee2fa", modifiers = ["italic"] }
"markup.link.url" = { fg = "jade", modifiers = ["italic"] }
"markup.link.text" = "neon-yellow"
"markup.quote" = { fg = "jade", modifiers = ["italic"] }
"markup.raw" = "pelati-red"
"markup.raw.inline" = "pelati-red"
"markup.raw.block" = "pelati-red"
# Git gutter
"diff.plus.gutter" = "#47ffa0"
"diff.minus.gutter" = "error"
"diff.delta.gutter" = "info"
# bufferline
"ui.bufferline" = { fg = "grey", bg = "#000000"}
"ui.bufferline.active" = { fg = "dark-grey", bg = "synth-red" }
[palette]
black = "#000000"
white = "#ffffff"
neon-yellow = "#fede5d"
blood-red = "#fe4450"
pelati-red = "#f73232"
synth-red = "#ff3366"
salmon = "#f97e72"
beaming-blue = "#36f9f6"
selection-blue = "#001069"
synthetic-green = "#1afc65"
jess-green = "#28b881"
orange = "#ff8b39"
jade = "#72f1b8"
mauve = "#848bbd"
grey = "#808080"
dark-grey = "#141414"
error = "#ff5252"
warning = "#ffab40"
info = "#40c4ff"

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Aaron Young
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,219 @@
# License: MIT License
# Sidra Theme for the Helix Editor
# Author: Md Atiquz Zaman <atiquzz42@gmail.com>
# Repo: https://github.com/atiquz/sidra
# Inspired by: One Monokai, Dracula, One Dark Pro
# Description: A customizable, balanced dark theme built for readability and flexibility.
# ===========================
# UI Element Styling
# ===========================
# USER INTERFACE
"ui.background" = { fg = "foreground", bg = "background" }
"ui.background.separator" = { fg = "white" }
"ui.linenr" = { fg = "fg_linenr" }
"ui.linenr.selected" = { fg = "fg_linenr_sld" }
"ui.help" = { fg = "fg_help", bg = "bg_help" }
"ui.popup" = { bg = "bg_popup" }
"ui.window" = { fg = "fg_window" }
"ui.text" = { fg = "fg_text" }
"ui.text.focus" = { fg = "fg_text_focus" }
"ui.text.inactive" = { fg = "fg_text_inactive" }
"ui.virtual" = { fg = "fg_virtual" }
"ui.virtual.ruler" = { bg = "bg_virtual_ruler" }
"ui.virtual.indent-guide" = { fg = "fg_virtual_indent" }
"ui.debug" = { fg = "fg_debug", modifiers = ["bold"] }
"ui.debug.active" = { fg = "fg_debug_active", modifiers = ["bold"] }
"ui.debug.breakpoint" = { fg = "fg_debug_breakpoint", modifiers = ["bold"] }
"ui.menu" = { fg = "gray", bg = "black" }
"ui.menu.selected" = { fg = "black", bg = "gray" }
# CURSOR
"ui.cursor" = { fg = "foreground", bg = "bg_normal", modifiers = ["dim"] }
"ui.cursor.match" = { fg = "foreground", bg = "bg_match", modifiers = ["dim"] }
"ui.cursor.normal" = { fg = "background", bg = "bg_normal", modifiers = ["dim"] }
"ui.cursor.insert" = { fg = "background", bg = "bg_insert", modifiers = ["dim"] }
"ui.cursor.select" = { fg = "background", bg = "bg_select", modifiers = ["dim"] }
"ui.cursor.primary.normal" = { fg = "background", bg = "bg_normal" }
"ui.cursor.primary.insert" = { fg = "background", bg = "bg_insert" }
"ui.cursor.primary.select" = { fg = "background", bg = "bg_select" }
"ui.cursorline" = { bg = "bg_cursorline" }
"ui.cursorline.primary" = { bg = "bg_cursorline" }
# SELECTION
"ui.selection" = { fg = "white", bg = "bg_selection" }
"ui.selection.primary" = { fg = "white", bg = "bg_selection" }
# STATUS LINE
"ui.statusline" = { fg = "fg_statusline", bg = "bg_statusline" }
"ui.statusline.inactive" = { fg = "fg_inactive", bg = "bg_inactive" }
"ui.statusline.normal" = { fg = "black", bg = "bg_normal", modifiers = ["bold"] }
"ui.statusline.insert" = { fg = "black", bg = "bg_insert", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "black", bg = "bg_select", modifiers = ["bold"] }
# MARKUP
"markup.heading" = { fg = "markup_heading" }
"markup.bold" = { fg = "markup_bold", modifiers = ["bold"] }
"markup.italic" = { fg = "markup_italic", modifiers = ["italic"] }
"markup.strikethrough" = { fg = "markup_strikethrough", modifiers = ["crossed_out", "bold"] }
"markup.link.url" = { fg = "markup_link_url", modifiers = ["underlined"] }
"markup.link.text" = { fg = "markup_link_text" }
"markup.raw" = { fg = "markup_raw" }
# GIT
"diff.plus" = { fg = "plus", modifiers = ["bold"] }
"diff.minus" = { fg = "minus", modifiers = ["bold"] }
"diff.delta" = { fg = "delta", modifiers = ["bold"] }
# HINT INFO ERROR & WARNING
"diagnostic.hint" = { underline = { color = "cl_hint", style = "curl" } }
"diagnostic.info" = { underline = { color = "cl_info", style = "curl" } }
"diagnostic.error" = { underline = { color = "cl_error", style = "curl" } }
"diagnostic.warning" = { underline = { color = "cl_warning", style = "curl" } }
hint = "cl_hint"
info = "cl_info"
error = "cl_error"
warning = "cl_warning"
# ===========================
# SYNTAX COLORS
# ===========================
# === ATTRIBUTES & KEYWORDS ===
attribute = "#a7bf67" # Olive green
keyword = "#A4A2B4" # Muted lavender gray
"keyword.directive" = "#D3D3D3" # Light gray (used to be "light-gray")
namespace = "#7095bf" # Steel blue
# === SYMBOLS & OPERATORS ===
punctuation = "#FFFFFF" # White
"punctuation.delimiter" = "#FFFFFF" # White (delimiter punctuation)
operator = "#987654" # Dusty brown (used to be "muddy")
special = "#c90076" # Pink Color
# === VARIABLES ===
variable = "#7ec67f" # Soft green
"variable.other.member" = "#7ec67f" # Soft green (class or object members)
"variable.parameter" = "#a8ffb4" # Pale mint green
"variable.builtin" = "#a8ffb4" # Pale mint green (special language vars)
# === TYPES ===
type = "#efbe4c" # Golden yellow
"type.builtin" = "#efbe4c" # Golden yellow (built-in types)
constructor = "#c19ef7" # Light lilac
# === FUNCTIONS ===
function = "#987654" # Dusty brown (used to be "muddy")
"function.macro" = "#987654" # Dusty brown (macro functions)
"function.builtin" = "#db985e" # Orange tan
# === TAGS ===
tag = "#d37a78" # Soft salmon pink
# === COMMENTS ===
comment = "#D3D3D3" # Light gray
# === CONSTANTS ===
constant = "#A5C4D4" # Pale blue
"constant.builtin" = "#f1fa8c" # Bright yellow
"constant.numeric" = "#b577b0" # Muted violet
"constant.character.escape" = "#c95c56" # Coral red (escape characters)
# === STRINGS ===
string = "#d6a560" # Sandy yellow-orange
# === LABELS ===
label = "#abcc8a" # Pale green
# ===========================
# Color Palette
# ===========================
[palette]
# ===== MODES COLORS =====
bg_normal = "#BD93F9" # Light purple
bg_insert = "#50fa7b" # Neon green
bg_select = "#8be9fd" # Cyan blue
bg_match = "#D3D3D3" # Light gray
# ===== GIT COLORS =====
plus = "#4F6F52" # Forest green
minus = "#B80000" # Vivid red
delta = "#3876BF" # Steel blue
# ===== MARKUP COLORS =====
markup_heading = "#ff69b4" # Hot pink
markup_bold = "#e7c547" # Bright yellow
markup_italic = "#b294bb" # Lavender
markup_strikethrough = "#d7005f" # Deep pink-red
markup_link_url = "#3876BF" # Steel blue
markup_link_text = "#FFA500" # Orange
markup_raw = "#808080" # Medium gray
# ===== PRIMARY UI COLORS =====
foreground = "#D3D3D3" # Light gray (default text)
background = "#1f1f21" # Very dark gray (background)
# ===== UI INTERFACE COLORS =====
fg_linenr = "#747575" # Dull silver (line numbers)
fg_linenr_sld = "#c7dddd" # Light cyan (selected line number)
fg_help = "#D3D3D3" # Light gray (help text)
bg_help = "#35353a" # Charcoal (help background)
bg_popup = "#3b3b3d" # Dark gray (popup background)
fg_window = "#F1DCA7" # Soft cream (window border/title)
fg_text = "#D3D3D3" # Light gray (main text)
fg_text_focus = "#83c679" # Light green (focused text)
fg_text_inactive = "#93a56f" # Olive green (inactive text)
# ===== VIRTUAL COLORS =====
fg_virtual = "#F1DCA7" # Cream (virtual text)
bg_virtual_ruler = "#363638" # Deep gray (ruler background)
fg_virtual_indent = "#5B5B5A" # Medium-dark gray (indent guides)
# ===== DEBUGGING COLORS =====
fg_debug = "#634450" # Plum (debug info)
fg_debug_active = "#3876BF" # Blue (active debug line)
fg_debug_breakpoint = "#B80000" # Red (breakpoint marker)
# ===== CURSOR, SELECTION, STATUSLINE =====
bg_cursorline = "#2d303e" # Slate blue-gray (cursor line)
bg_selection = "#71797E" # Cool gray (selected text background)
fg_statusline = "#D3D3D3" # Light gray (statusline text)
bg_statusline = "#303030" # Dark gray (statusline background)
fg_inactive = "#4b5059" # Dim gray (inactive statusline text)
bg_inactive = "#303030" # Dark gray (inactive statusline bg)
# ===== HINT INFO ERROR & WARNING COLORS =====
cl_hint = "#f1fa8c" # Bright yellow
cl_info = "#f1fa8c" # Same as hint
cl_error = "#ff69b4" # Bright pink
cl_warning = "#f1fa8c" # Same as hint

View File

@ -36,7 +36,8 @@ pub fn typable_commands() -> Result<String, DynError> {
"Description".to_owned(),
]));
let cmdify = |s: &str| format!("`:{}`", s);
// escape | so it doesn't get rendered as a column separator
let cmdify = |s: &str| format!("`:{}`", s.replace('|', "\\|"));
for cmd in TYPABLE_COMMAND_LIST {
let names = std::iter::once(&cmd.name)