From aad7df577bb1380811121fe58f927fe5db1b8e4f Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Wed, 26 Jun 2024 23:04:17 +0200 Subject: [PATCH] Add new color theme 'iroaseta' (#10381) * Add new color theme 'iroaseta' * Update runtime/themes/iroaseta.toml Co-authored-by: postsolar <120750161+postsolar@users.noreply.github.com> * Update iroaseta.toml Add virtual jump label theme setting * Update runtime/themes/iroaseta.toml Co-authored-by: Michael Davis * Update iroaseta.toml update storage. keyword.storage. according to suggestion, and update color. * Update iroaseta.toml remove unused palette * Update iroaseta.toml add missing setting for bufferline * Update iroaseta.toml update diagnostic fg color * Update iroaseta.toml I made the config more comprehensive and took all available themes settings from the manual. Some are commented out though. * Update iroaseta.toml add missing colors * Update iroaseta.toml Made some final adjustments to the color theme to improve visibility and reduce eye strain. * Update runtime/themes/iroaseta.toml Co-authored-by: Michael Davis * Update runtime/themes/iroaseta.toml Co-authored-by: Michael Davis * Update iroaseta.toml remove redundant settings * Update iroaseta.toml update color name --------- Co-authored-by: postsolar <120750161+postsolar@users.noreply.github.com> Co-authored-by: Michael Davis Large Gruvbox refactoring (#10773) * gruvbox refactoring * removed unnecessary lines * set purple1 for operators * changed diagnostics colors * removed some unnecessary lines * set diff.delta color to yellow * removed some tag colors Delay auto-save until exiting insert mode (#11047) Saving while in insert mode causes issues with the modification indicator and this is very easy to reproduce with the current state of the auto-save hook. We can tweak the hook slightly to await the mode switch out of insert mode to perform the save. The debounce is preserved: if you save and then immediately exit insert mode the debounce will be respected. If the debounce lapses while you are in insert mode, the save occurs as you switch out of insert mode immediately. VHDL highlights.scm improvement (#10845) Fix homebrew formula link (#11058) Co-authored-by: Mark Murphy build(deps): bump the rust-dependencies group with 3 updates (#11072) Bumps the rust-dependencies group with 3 updates: [log](https://github.com/rust-lang/log), [serde_json](https://github.com/serde-rs/json) and [cc](https://github.com/rust-lang/cc-rs). Updates `log` from 0.4.21 to 0.4.22 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22) Updates `serde_json` from 1.0.117 to 1.0.120 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.120) Updates `cc` from 1.0.100 to 1.0.104 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.104) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: cc dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore: update cairo tree sitter + queries (#11067) Bump time from broken version (0.3.23) (#11065) Tell language servers that Helix can request formatting (#11064) Without providing the formatting capability, the language server might not advertise its ability to format in return, causing the :format command to be broken. Override far too dark cursorline (#11071) Add hsc filetype to haskell (#11074) --- Cargo.lock | 49 ++- docs/releases.md | 2 +- helix-lsp/src/client.rs | 3 + helix-term/src/handlers/auto_save.rs | 76 ++++- helix-view/src/handlers.rs | 8 +- languages.toml | 4 +- runtime/queries/cairo/highlights.scm | 6 + runtime/queries/cairo/indents.scm | 8 +- runtime/queries/vhdl/highlights.scm | 438 +++++++-------------------- runtime/themes/gruvbox.toml | 181 ++++++----- runtime/themes/gruvbox_light.toml | 1 + runtime/themes/iroaseta.toml | 162 ++++++++++ 12 files changed, 517 insertions(+), 421 deletions(-) create mode 100644 runtime/themes/iroaseta.toml diff --git a/Cargo.lock b/Cargo.lock index 577298d8bc4e5..d225b66507d73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,9 +136,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" [[package]] name = "cc" -version = "1.0.100" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" [[package]] name = "cfg-if" @@ -351,6 +351,15 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1711,9 +1720,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lsp-types" @@ -1795,6 +1804,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" version = "0.2.15" @@ -1896,6 +1911,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "proc-macro2" version = "1.0.76" @@ -2118,9 +2139,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -2358,13 +2379,16 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", "libc", + "num-conv", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -2372,16 +2396,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] diff --git a/docs/releases.md b/docs/releases.md index e39cfd91034ca..2be14553a225c 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -31,7 +31,7 @@ being published. * Post to reddit * [Example post](https://www.reddit.com/r/rust/comments/uzp5ze/helix_editor_2205_released/) -[homebrew formula]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/helix.rb +[homebrew formula]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/h/helix.rb ## Changelog Curation diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 254625a3a0254..0a822c5b3bd14 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -616,6 +616,9 @@ impl Client { prepare_support_default_behavior: None, honors_change_annotations: Some(false), }), + formatting: Some(lsp::DocumentFormattingClientCapabilities { + dynamic_registration: Some(false), + }), code_action: Some(lsp::CodeActionClientCapabilities { code_action_literal_support: Some(lsp::CodeActionLiteralSupport { code_action_kind: lsp::CodeActionKindLiteralSupport { diff --git a/helix-term/src/handlers/auto_save.rs b/helix-term/src/handlers/auto_save.rs index d3f7f6fc124ad..4e154df808a7b 100644 --- a/helix-term/src/handlers/auto_save.rs +++ b/helix-term/src/handlers/auto_save.rs @@ -1,39 +1,82 @@ -use std::time::Duration; +use std::{ + sync::{ + atomic::{self, AtomicBool}, + Arc, + }, + time::Duration, +}; use anyhow::Ok; use arc_swap::access::Access; use helix_event::{register_hook, send_blocking}; -use helix_view::{events::DocumentDidChange, handlers::Handlers, Editor}; +use helix_view::{ + document::Mode, + events::DocumentDidChange, + handlers::{AutoSaveEvent, Handlers}, + Editor, +}; use tokio::time::Instant; use crate::{ commands, compositor, + events::OnModeSwitch, job::{self, Jobs}, }; #[derive(Debug)] -pub(super) struct AutoSaveHandler; +pub(super) struct AutoSaveHandler { + save_pending: Arc, +} impl AutoSaveHandler { pub fn new() -> AutoSaveHandler { - AutoSaveHandler + AutoSaveHandler { + save_pending: Default::default(), + } } } impl helix_event::AsyncHook for AutoSaveHandler { - type Event = u64; + type Event = AutoSaveEvent; fn handle_event( &mut self, - timeout: Self::Event, - _: Option, + event: Self::Event, + existing_debounce: Option, ) -> Option { - Some(Instant::now() + Duration::from_millis(timeout)) + match event { + Self::Event::DocumentChanged { save_after } => { + Some(Instant::now() + Duration::from_millis(save_after)) + } + Self::Event::LeftInsertMode => { + if existing_debounce.is_some() { + // If the change happened more recently than the debounce, let the + // debounce run down before saving. + existing_debounce + } else { + // Otherwise if there is a save pending, save immediately. + if self.save_pending.load(atomic::Ordering::Relaxed) { + self.finish_debounce(); + } + None + } + } + } } fn finish_debounce(&mut self) { - job::dispatch_blocking(move |editor, _| request_auto_save(editor)) + let save_pending = self.save_pending.clone(); + job::dispatch_blocking(move |editor, _| { + if editor.mode() == Mode::Insert { + // Avoid saving while in insert mode since this mixes up + // the modification indicator and prevents future saves. + save_pending.store(true, atomic::Ordering::Relaxed); + } else { + request_auto_save(editor); + save_pending.store(false, atomic::Ordering::Relaxed); + } + }) } } @@ -54,7 +97,20 @@ pub(super) fn register_hooks(handlers: &Handlers) { register_hook!(move |event: &mut DocumentDidChange<'_>| { let config = event.doc.config.load(); if config.auto_save.after_delay.enable { - send_blocking(&tx, config.auto_save.after_delay.timeout); + send_blocking( + &tx, + AutoSaveEvent::DocumentChanged { + save_after: config.auto_save.after_delay.timeout, + }, + ); + } + Ok(()) + }); + + let tx = handlers.auto_save.clone(); + register_hook!(move |event: &mut OnModeSwitch<'_, '_>| { + if event.old_mode == Mode::Insert { + send_blocking(&tx, AutoSaveEvent::LeftInsertMode) } Ok(()) }); diff --git a/helix-view/src/handlers.rs b/helix-view/src/handlers.rs index 352abb8813068..e2848f26487d1 100644 --- a/helix-view/src/handlers.rs +++ b/helix-view/src/handlers.rs @@ -7,11 +7,17 @@ use crate::{DocumentId, Editor, ViewId}; pub mod dap; pub mod lsp; +#[derive(Debug)] +pub enum AutoSaveEvent { + DocumentChanged { save_after: u64 }, + LeftInsertMode, +} + pub struct Handlers { // only public because most of the actual implementation is in helix-term right now :/ pub completions: Sender, pub signature_hints: Sender, - pub auto_save: Sender, + pub auto_save: Sender, } impl Handlers { diff --git a/languages.toml b/languages.toml index 7ffc998b8a365..9c5ce68189d96 100644 --- a/languages.toml +++ b/languages.toml @@ -1269,7 +1269,7 @@ source = { git = "https://github.com/ikatyang/tree-sitter-yaml", rev = "0e36bed1 name = "haskell" scope = "source.haskell" injection-regex = "hs|haskell" -file-types = ["hs", "hs-boot"] +file-types = ["hs", "hs-boot", "hsc"] roots = ["Setup.hs", "stack.yaml", "cabal.project"] comment-token = "--" block-comment-tokens = { start = "{-", end = "-}" } @@ -2081,7 +2081,7 @@ language-servers = [ "cairo-language-server" ] [[grammar]] name = "cairo" -source = { git = "https://github.com/starkware-libs/tree-sitter-cairo", rev = "0596baab741ffacdc65c761d5d5ffbbeae97f033" } +source = { git = "https://github.com/starkware-libs/tree-sitter-cairo", rev = "e3a0212261c125cb38248458cd856c0ffee2b398" } [[language]] name = "cpon" diff --git a/runtime/queries/cairo/highlights.scm b/runtime/queries/cairo/highlights.scm index d2cabd1c58bd9..16918c141a9f2 100644 --- a/runtime/queries/cairo/highlights.scm +++ b/runtime/queries/cairo/highlights.scm @@ -95,6 +95,12 @@ ; ------- ; Keywords ; ------- + +(for_expression + "for" @keyword.control.repeat) + +"in" @keyword.control + [ "match" "if" diff --git a/runtime/queries/cairo/indents.scm b/runtime/queries/cairo/indents.scm index 35c1624298c3b..b20317ab07171 100644 --- a/runtime/queries/cairo/indents.scm +++ b/runtime/queries/cairo/indents.scm @@ -115,4 +115,10 @@ (#not-same-line? @expr-start @pattern-guard) ) @indent - +(for_expression + "in" @in + . + (_) @indent + (#not-same-line? @in @indent) + (#set! "scope" "all") +) diff --git a/runtime/queries/vhdl/highlights.scm b/runtime/queries/vhdl/highlights.scm index 59cef41cd013c..1b9742fc8771e 100644 --- a/runtime/queries/vhdl/highlights.scm +++ b/runtime/queries/vhdl/highlights.scm @@ -1,338 +1,134 @@ -(comment) @comment +[ + "alias" "package" "file" "entity" "architecture" "type" "subtype" + "attribute" "to" "downto" "signal" "variable" "record" "array" + "others" "process" "component" "shared" "constant" "port" "generic" + "generate" "range" "map" "in" "inout" "of" "out" "configuration" + "pure" "impure" "is" "begin" "end" "context" "wait" "until" "after" + "report" "open" "exit" "assert" "next" "null" "force" "property" + "release" "sequence" "transport" "unaffected" "select" "severity" + "register" "reject" "postponed" "on" "new" "literal" "linkage" + "inertial" "guarded" "group" "disconnect" "bus" "buffer" "body" + "all" "block" "access" +] @keyword + +[ + "function" "procedure" +] @keyword.function -; Keywords [ - ; vhdl 08 - "abs" - "access" - "after" - "alias" - "all" - "and" - "architecture" - "array" - "assert" - "attribute" - "begin" - "block" - "body" - "buffer" - "bus" - "case" - "component" - "configuration" - "constant" - "disconnect" - "downto" - "else" - "elsif" - "end" - "entity" - "exit" - "file" - "for" - "function" - "generic" - "group" - "guarded" - "if" - "impure" - "in" - "inertial" - "inout" - "is" - "label" - "library" - "linkage" - "literal" - "loop" - "map" - "mod" - "nand" - "new" - "next" - "nor" - "not" - "null" - "of" - "on" - "open" - "or" - "others" - "out" - "package" - "port" - "postponed" - "procedure" - "process" - "protected" - "pure" - "range" - "record" - "register" - "reject" - "rem" - "report" "return" - "rol" - "ror" - "select" - "severity" - "shared" - "signal" - "sla" - "sll" - "sra" - "srl" - "subtype" - "then" - "to" - "transport" - "type" - "unaffected" - "units" - "until" - "use" - "variable" - "wait" - "when" - "while" - "with" - "xnor" - "xor" - ; vhdl 08 - "context" - "force" - "property" - "release" - "sequence" -] @keyword +] @keyword.control.return [ - ; vhdl 02 - "boolean" - "bit" - "bit_vector" - ;"character" - ;"severity_level" - ;"integer" - ;"real" - ;"time" - ;"natural" - ;"positive" - "string" - ;"line" - ;"text" - ;"side" - ;"unsigned" - ;"signed" - ;"delay_length" - ;"file_open_kind" - ;"file_open_status" - ;"std_logic" - ;"std_logic_vector" - ;"std_ulogic" - ;"std_ulogic_vector" - ; vhdl 08 - ;"boolean_vector" - ;"integer_vector" - ;"real_vector" - ;"time_vector" - ; math types - ;"complex" - ;"complex_polar" - ;"positive_real" - ;"principal_value" -] @type.builtin + "for" "loop" "while" +] @keyword.control.repeat + +[ + "if" "elsif" "else" "case" "then" "when" +] @keyword.control.conditional + +[ + "library" "use" +] @keyword.control.import + +(comment) @comment + +(type_mark) @type [ - ; vhdl 02 - "base" - "left" - "right" - "high" - "low" - "pos" - "val" - "succ" - "pred" - "leftof" - "rightof" - "range" - "reverse_range" - "length" - "delayed" - "stable" - "quiet" - "transaction" - "event" - "active" - "last_event" - "last_active" - "last_value" - "driving" - "driving_value" - "ascending" - "value" - "image" - "simple_name" - "instance_name" - "path_name" - ;"foreign" - ; vhdl 08 - "instance_name" - "path_name" -] @attribute + "(" ")" "[" "]" +] @punctuation.bracket -;[ - ; vhdl 02 - ;"now" - ;"resolved" - ;"rising_edge" - ;"falling_edge" - ;"read" - ;"readline" - ;"hread" - ;"oread" - ;"write" - ;"writeline" - ;"hwrite" - ;"owrite" - ;"endfile" - ;"resize" - ;"is_X" - ;"std_match" - ;"shift_left" - ;"shift_right" - ;"rotate_left" - ;"rotate_right" - ;"to_unsigned" - ;"to_signed" - ;"to_integer" - ;"to_stdLogicVector" - ;"to_stdULogic" - ;"to_stdULogicVector" - ;"to_bit" - ;"to_bitVector" - ;"to_X01" - ;"to_X01Z" - ;"to_UX01" - ;"to_01" - ;"conv_unsigned" - ;"conv_signed" - ;"conv_integer" - ;"conv_std_logic_vector" - ;"shl" - ;"shr" - ;"ext" - ;"sxt" - ;"deallocate" - ; vhdl 08 - ;"finish" - ;"flush" - ;"justify" - ;"maximum" - ;"minimum" - ;"resolution_limit" - ;"stop" - ;"swrite" - ;"tee" - ;"to_binarystring" - ;"to_bstring" - ;"to_hexstring" - ;"to_hstring" - ;"to_octalstring" - ;"to_ostring" - ;"to_string" - ; vhdl math - ;"arccos" - ;"arccosh" - ;"arcsin" - ;"arcsinh" - ;"arctan" - ;"arctanh" - ;"arg" - ;"cbrt" - ;"ceil" - ;"cmplx" - ;"complex_to_polar" - ;"conj" - ;"cos" - ;"cosh" - ;"exp" - ;"floor" - ;"get_principal_value" - ;"log" - ;"log10" - ;"log2" - ;"polar_to_complex" - ;"realmax" - ;"realmin" - ;"round" - ;"sign" - ;"sin" - ;"sinh" - ;"sqrt" - ;"tan" - ;"tanh" - ;"trunc" - ;"uniform" -;] @function.builtin +[ + "." ";" "," ":" +] @punctuation.delimiter -; Operators [ - "+" - "-" - "*" - "/" - "**" - "abs" - "not" - "mod" - "rem" - "&" - "sll" - "srl" - "sla" - "sra" - "rol" - "ror" - "=" - "/=" - "?=" - "?/=" - "?<" - "?<=" - "?>" - "?>=" - "<" - "<=" - ">" - ">=" - "and" - "or" - "nand" - "nor" - "xor" - "xnor" - ":=" - "<=" - "??" + "=>" "<=" "+" ":=" "=" "/=" "<" ">" "-" "*" + "**" "/" "?>" "?<" "?<=" "?>=" "?=" "?/=" +; "?/" errors, maybe due to escape character + (attribute_name "'") + (index_subtype_definition (any)) ] @operator [ - ";" - "," -] @punctuation.delimiter + "not" "xor" "xnor" "and" "nand" "or" "nor" "mod" "rem" + (attribute_name "'") + (index_subtype_definition (any)) +] @keyword.operator [ - "(" - ")" - "'" -] @punctuation.bracket + (real_decimal) + (integer_decimal) +] @constant.numeric + +(character_literal) @constant.character + +[ + (string_literal) + (bit_string_literal) +] @string + +(physical_literal + unit: (simple_name) @attribute) + +(attribute_name + prefix: (_) @variable + designator: (_) @attribute) + +((simple_name) @variable.builtin (#any-of? @variable.builtin + "true" "false" "now")) + +(severity_expression) @constant.builtin + +(procedure_call_statement + procedure: (simple_name) @function) -(full_type_declaration "type" name: (identifier) @type) -(signal_declaration "signal" (identifier_list) @variable) -(variable_declaration "variable" (identifier_list) @variable) -(constant_declaration "constant" (identifier_list) @variable) +(ambiguous_name + prefix: (simple_name) @function.builtin (#any-of? @function.builtin + "rising_edge" "falling_edge" "find_rightmost" "find_leftmost" + "maximum" "minimum" "shift_left" "shift_right" "rotate_left" + "rotate_right" "sll" "srl" "rol" "ror" "sla" "sra" "resize" + "mod" "rem" "abs" "saturate" + "to_sfixed" "to_ufixed" "to_signed" "to_unsigned" "to_real" + "to_integer" "sfixed_low" "ufixed_low" "sfixed_high" + "ufixed_high" "to_slv" "to_stdulogicvector" "to_sulv" + "to_float" "std_logic" "std_logic_vector" "integer" "signed" + "unsigned" "real" "std_ulogic_vector" + "std_ulogic" "x01" "x01z" "ux01" "ux01Z" +;math_real + "sign" "ceil" "floor" "round" "fmax" "fmin" "uniform" "srand" + "rand" "get_rand_max" "sqrt" "cbrt" "exp" "log" "log2" "log10" + "sin" "cos" "tan" "asin" "acos" "atan" "atan2" "sinh" "cosh" + "tanh" "asinh" "acosh" "atanh" "realmax" "realmin" "trunc" + "conj" "arg" "polar_to_complex" "complex_to_polar" + "get_principal_value" "cmplx" +;std_textio + "read" "write" "hread" "hwrite" "to_hstring" "to_string" + "from_hstring" "from_string" + "justify" "readline" "sread" "string_read" " bread" + "binary_read" "oread" "octal_read" "hex_read" + "writeline" "swrite" "string_write" "bwrite" + "binary_write" "owrite" "octal_write" "hex_write" + "synthesis_return" +;std_logic_1164 + "resolved" "logic_type_encoding" "is_signed" "to_bit" + "to_bitvector" "to_stdulogic" "to_stdlogicvector" + "to_bit_vector" "to_bv" "to_std_logic_vector" + "to_std_ulogic_vector" "to_01" "to_x01" "to_x01z" "to_ux01" + "is_x" "to_bstring" "to_binary_string" "to_ostring" + "to_octal_string" "to_hex_string" +;float_pkg + "add" "subtract" "multiply" "divide" "remainder" "modulo" + "reciprocal" "dividebyp2" "mac" "eq" "ne" "lt" "gt" "le" "ge" + "to_float32" "to_float64" "to_float128" "realtobits" "bitstoreal" + "break_number" "normalize" "copysign" "scalb" "logb" "nextafter" + "unordered" "finite" "isnan" "zerofp" "nanfp" "qnanfp" + "pos_inffp" "neg_inffp" "neg_zerofp" "from_bstring" + "from_binary_string" "from_ostring" "from_octal_string" + "from_hex_string" +;fixed_pkg + "add_carry" "to_ufix" "to_sfix" "ufix_high" + "ufix_low" "sfix_high" "sfix_low" +)) diff --git a/runtime/themes/gruvbox.toml b/runtime/themes/gruvbox.toml index 67ca066f71f9b..220843b50de3e 100644 --- a/runtime/themes/gruvbox.toml +++ b/runtime/themes/gruvbox.toml @@ -1,89 +1,125 @@ # Author : Jakub Bartodziej # The theme uses the gruvbox dark palette with standard contrast: github.com/morhetz/gruvbox -"attribute" = "aqua1" -"keyword" = { fg = "red1" } -"keyword.directive" = "red0" -"namespace" = "aqua1" -"punctuation" = "orange1" -"punctuation.delimiter" = "orange1" -"operator" = "purple1" -"special" = "purple0" -"variable.other.member" = "blue1" -"variable" = "fg1" -"variable.builtin" = "orange1" -"variable.parameter" = "fg2" -"type" = "yellow1" -"type.builtin" = "yellow1" -"constructor" = { fg = "purple1", modifiers = ["bold"] } -"function" = { fg = "green1", modifiers = ["bold"] } -"function.macro" = "aqua1" -"function.builtin" = "yellow1" -"tag" = "red1" -"comment" = { fg = "gray1", modifiers = ["italic"] } +"annotation" = { fg = "fg1" } + +"attribute" = { fg = "aqua1", modifiers = ["italic"] } + +"comment" = { fg = "gray", modifiers = ["italic"] } + "constant" = { fg = "purple1" } -"constant.builtin" = { fg = "purple1", modifiers = ["bold"] } -"string" = "green1" -"constant.numeric" = "purple1" -"constant.character.escape" = { fg = "fg2", modifiers = ["bold"] } -"label" = "aqua1" -"module" = "aqua1" - -"diff.plus" = "green1" -"diff.delta" = "orange1" -"diff.minus" = "red1" - -"warning" = "yellow1" -"error" = "red1" -"info" = "aqua1" -"hint" = "blue1" +"constant.character" = { fg = "aqua1" } +"constant.character.escape" = { fg = "orange1" } +"constant.macro" = { fg = "aqua1" } +"constructor" = { fg = "purple1" } + +"definition" = { underline = { color = "aqua1" } } + +"diagnostic" = { underline = { color = "orange1", style = "curl" } } +"diagnostic.deprecated" = { modifiers = ["crossed_out"] } +"diagnostic.error" = { underline = { color = "red1", style = "curl" } } +"diagnostic.hint" = { underline = { color = "blue1", style = "curl" } } +"diagnostic.info" = { underline = { color = "aqua1", style = "curl" } } +"diagnostic.warning" = { underline = { color = "yellow1", style = "curl" } } +# "diagnostic.unnecessary" = { modifiers = ["dim"] } # do not remove this for future resolving + +"error" = { fg = "red1" } +"hint" = { fg = "blue1" } +"info" = { fg = "aqua1" } +"warning" = { fg = "yellow1" } + +"diff.delta" = { fg = "yellow1" } +"diff.minus" = { fg = "red1" } +"diff.plus" = { fg = "green1" } + +"function" = { fg = "green1" } +"function.builtin" = { fg = "yellow1" } +"function.macro" = { fg = "blue1" } + +"keyword" = { fg = "red1" } +"keyword.control.import" = { fg = "aqua1" } + +"label" = { fg = "red1" } + +"markup.bold" = { modifiers = ["bold"] } +"markup.heading" = "aqua1" +"markup.italic" = { modifiers = ["italic"] } +"markup.link.text" = "red1" +"markup.link.url" = { fg = "green1", modifiers = ["underlined"] } +"markup.raw" = "red1" +"markup.strikethrough" = { modifiers = ["crossed_out"] } + +"module" = { fg = "aqua1" } + +"namespace" = { fg = "fg1" } + +"operator" = { fg = "purple1" } + +"punctuation" = { fg = "orange1" } + +"special" = { fg = "purple0" } + +"string" = { fg = "green1" } +"string.regexp" = { fg = "orange1" } +"string.special" = { fg = "orange1" } +"string.symbol" = { fg = "yellow1" } + +"tag" = { fg = "aqua1" } + +"type" = { fg = "yellow1" } +"type.enum.variant" = { modifiers = ["italic"] } "ui.background" = { bg = "bg0" } -"ui.linenr" = { fg = "bg4" } -"ui.linenr.selected" = { fg = "yellow1" } -"ui.cursorline" = { bg = "bg1" } -"ui.statusline" = { fg = "fg1", bg = "bg2" } -"ui.statusline.normal" = { fg = "fg1", bg = "bg2" } -"ui.statusline.insert" = { fg = "fg1", bg = "blue0" } -"ui.statusline.select" = { fg = "fg1", bg = "orange0" } -"ui.statusline.inactive" = { fg = "fg4", bg = "bg1" } "ui.bufferline" = { fg = "fg1", bg = "bg1" } "ui.bufferline.active" = { fg = "bg0", bg = "yellow0" } "ui.bufferline.background" = { bg = "bg2" } -"ui.popup" = { bg = "bg1" } -"ui.window" = { bg = "bg1" } + +"ui.cursor" = { fg = "bg1", bg = "bg2" } +"ui.cursor.insert" = { fg = "bg1", bg = "blue0" } +"ui.cursor.normal" = { fg = "bg1", bg = "gray" } +"ui.cursor.select" = { fg = "bg1", bg = "orange0" } +"ui.cursor.match" = { fg = "fg3", bg = "bg3" } + +"ui.cursor.primary" = { bg = "fg3", fg = "bg1" } +"ui.cursor.primary.insert" = { fg = "bg1", bg = "blue1" } +"ui.cursor.primary.normal" = { fg = "bg1", bg = "fg3" } +"ui.cursor.primary.select" = { fg = "bg1", bg = "orange1" } + +"ui.cursorline" = { bg = "bg0_s" } +"ui.cursorline.primary" = { bg = "bg1" } + "ui.help" = { bg = "bg1", fg = "fg1" } -"ui.text" = { fg = "fg1" } -"ui.text.focus" = { fg = "fg1" } -"ui.selection" = { bg = "bg2" } -"ui.selection.primary" = { bg = "bg3" } -"ui.cursor.primary" = { bg = "fg4", fg = "bg1" } -"ui.cursor.match" = { bg = "bg3" } +"ui.linenr" = { fg = "bg3" } +"ui.linenr.selected" = { fg = "yellow1" } "ui.menu" = { fg = "fg1", bg = "bg2" } "ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] } -"ui.virtual.whitespace" = "bg2" +"ui.popup" = { bg = "bg1" } +"ui.selection" = { bg = "bg2" } +"ui.selection.primary" = { bg = "bg3" } + +"ui.statusline" = { fg = "fg1", bg = "bg2" } +"ui.statusline.inactive" = { fg = "fg4", bg = "bg2" } +"ui.statusline.insert" = { fg = "bg1", bg = "blue1", modifiers = ["bold"] } +"ui.statusline.normal" = { fg = "bg1", bg = "fg3", modifiers = ["bold"] } +"ui.statusline.select" = { fg = "bg1", bg = "orange1", modifiers = ["bold"] } + +"ui.text" = { fg = "fg1" } +"ui.virtual.inlay-hint" = { fg = "gray" } +"ui.virtual.jump-label" = { fg = "purple0", modifiers = ["bold"] } "ui.virtual.ruler" = { bg = "bg1" } -"ui.virtual.inlay-hint" = { fg = "gray1" } +"ui.virtual.whitespace" = "bg2" "ui.virtual.wrap" = { fg = "bg2" } -"ui.virtual.jump-label" = { fg = "purple0", modifiers = ["bold"] } +"ui.window" = { bg = "bg1" } -"diagnostic.warning" = { underline = { color = "yellow1", style = "curl" } } -"diagnostic.error" = { underline = { color = "red1", style = "curl" } } -"diagnostic.info" = { underline = { color = "aqua1", style = "curl" } } -"diagnostic.hint" = { underline = { color = "blue1", style = "curl" } } -"diagnostic.unnecessary" = { modifiers = ["dim"] } -"diagnostic.deprecated" = { modifiers = ["crossed_out"] } +"variable" = { fg = "fg1" } +"variable.builtin" = { fg = "orange1", modifiers = ["italic"] } +"variable.other.member" = { fg = "blue1" } +"variable.parameter" = { fg = "blue1", modifiers = ["italic"] } -"markup.heading" = "aqua1" -"markup.bold" = { modifiers = ["bold"] } -"markup.italic" = { modifiers = ["italic"] } -"markup.strikethrough" = { modifiers = ["crossed_out"] } -"markup.link.url" = { fg = "green1", modifiers = ["underlined"] } -"markup.link.text" = "red1" -"markup.raw" = "red1" [palette] -bg0 = "#282828" # main background +bg0 = "#282828" # main background +bg0_s = "#32302f" bg1 = "#3c3836" bg2 = "#504945" bg3 = "#665c54" @@ -93,13 +129,12 @@ fg0 = "#fbf1c7" fg1 = "#ebdbb2" # main foreground fg2 = "#d5c4a1" fg3 = "#bdae93" -fg4 = "#a89984" # gray0 +fg4 = "#a89984" -gray0 = "#a89984" -gray1 = "#928374" +gray = "#928374" -red0 = "#cc241d" # neutral -red1 = "#fb4934" # bright +red0 = "#cc241d" # neutral +red1 = "#fb4934" # bright green0 = "#98971a" green1 = "#b8bb26" yellow0 = "#d79921" diff --git a/runtime/themes/gruvbox_light.toml b/runtime/themes/gruvbox_light.toml index 59ce990112e5b..ba216020b8cf4 100644 --- a/runtime/themes/gruvbox_light.toml +++ b/runtime/themes/gruvbox_light.toml @@ -6,6 +6,7 @@ inherits = "gruvbox" "ui.cursor.primary" = { modifiers = ["reversed"] } "ui.cursor.match" = { bg = "bg2" } +"ui.cursorline" = { bg = "bg1" } [palette] bg0 = "#fbf1c7" # main background diff --git a/runtime/themes/iroaseta.toml b/runtime/themes/iroaseta.toml new file mode 100644 index 0000000000000..a26293d62249d --- /dev/null +++ b/runtime/themes/iroaseta.toml @@ -0,0 +1,162 @@ +# Theme: Iroaseta +# Author: YardQuit + +# SYNTAX HIGHLIGHTING +"attribute" = { fg = "yellow" } +"type" = { fg = "white" } +"type.builtin" = { fg = "white" } +"type.parameter" = { fg = "white" } +"type.enum" = { fg = "white" } +"type.enum.variant" = { fg = "white" } +"constructor" = { fg = "orange" } +"constant" = { fg = "blue" } +"constant.character.escape" = { fg = "yellow" } +"string" = { fg = "blue" } +"string.regexp" = { fg = "yellow" } +"comment" = { fg = "gray" } +"variable" = { fg = "orange" } +"variable.parameter" = { fg = "yellow" } +"variable.other" = { fg = "green" } +"variable.other.member" = { fg = "green" } +"label" = { fg = "blue" } +"punctuation" = { fg = "white" } +"punctuation.bracket" = { fg = "orange" } +"punctuation.special" = { fg = "yellow" } +"keyword" = { fg = "red" } +"keyword.operator" = { fg = "blue" } +"keyword.directive" = { fg = "white" } +"keyword.function" = { fg = "red" } +"keyword.storage" = { fg = "red" } +"keyword.storage.modifier" = { fg = "green" } +"operator" = { fg = "white" } +"function" = { fg = "purple" } +"function.method" = { fg = "green" } +"function.macro" = { fg = "green" } +"function.special" = { fg = "yellow" } +"tag" = { fg = "green" } +"namespace" = { fg = "white" } +"diff" = { fg = "white" } +"diff.minus" = { fg = "red" } +"diff.delta" = { fg = "brown" } + +# MARKUP, SYNAX HIGHLIGHTING AND INTERFACE HYBRID +"markup.heading" = { fg = "blaze_orange" } +"markup.heading.1" = { fg = "crystal_blue", modifiers = ["bold"] } +"markup.heading.2" = { fg = "sky_blue", modifiers = ["bold"] } +"markup.heading.3" = { fg = "dreamy_blue", modifiers = ["bold"] } +"markup.heading.4" = { fg = "crystal_blue" } +"markup.heading.5" = { fg = "sky_blue" } +"markup.heading.6" = { fg = "dreamy_blue" } +"markup.list" = { fg = "blaze_orange" } +"markup.bold" = { fg = "crystal_blue", modifiers = ["bold"] } +"markup.italic" = { fg = "crystal_blue", modifiers = ["italic"] } +"markup.strikethrough" = { fg = "crystal_blue", modifiers = ["crossed_out"] } +"markup.link" = { fg = "crystal_blue", underline = { color = "light_purple", style = "line" } } +"markup.link.url" = { fg = "slate_purple", underline = { color = "slate_purple", style = "line" } } +"markup.link.label" = { fg = "crystal_blue" } +"markup.link.text" = { fg = "crystal_blue", modifiers = ["bold"] } +"markup.quote" = { fg = "misty_white", modifiers = ["italic"] } +"markup.raw" = { fg = "misty_white" } +"markup.raw.block" = { fg = "white" } + +# USER INTERFACE +"ui.background" = { bg = "amber_shadow"} # workspace background +"ui.background.separator" = { fg = "misty_white" } # picker separator below input line (space + j) +"ui.gutter" = { bg = "amber_shadow" } # gutter +"ui.gutter.selected" = { bg = "pitch_black" } # gutter for the line the cursor is on +"ui.linenr" = { fg = "slate_gray" } # line numbers +"ui.linenr.selected" = { fg = "blaze_orange", modifiers = ["bold"] } # line number for the line the cursor is on +"ui.statusline" = { fg = "misty_white", bg = "pitch_black" } # statusline, fucused +"ui.statusline.inactive" = { fg = "slate_gray", bg = "dark_steel" } # statusline, unfocused +"ui.statusline.normal" = { fg = "amber_shadow", bg = "leafy_green", modifiers = ["bold"] } # statusline normal mode (if editor.color-modes is enabled) +"ui.statusline.insert" = { fg = "amber_shadow", bg = "blaze_orange", modifiers = ["bold"] } # statusline insert mode (if editor.color-modes is enabled) +"ui.statusline.select" = { fg = "amber_shadow", bg = "sky_blue", modifiers = ["bold"] } # statusline select mode (if editor.color-modes is enabled) +"ui.statusline.separator" = { fg = "misty_white" } # separator character is statusline +"ui.bufferline" = { fg = "slate_gray", modifiers = ["bold"] } # bufferline inactive tab +"ui.bufferline.active" = { fg = "misty_white", bg = "rustic_red" } # bufferline active tab +"ui.bufferline.background" = { bg = "pitch_black" } # bufferline background +"ui.virtual.ruler" = { bg = "rustic_red" } # ruler columns +"ui.virtual.whitespace" = { fg = "brown" } # whitespace characters +"ui.virtual.indent-guide" = { fg = "brown" } # vertical indent width guides +"ui.virtual.inlay-hint" = { fg = "slate_gray" } # inlay hints of all kinds +"ui.virtual.inlay-hint.parameter" = { fg = "slate_gray" } # inlay hints of kind parameter (lsps are not required to set a kind) +"ui.virtual.inlay-hint.type" = { fg = "slate_gray" } # inlay hints of kind type (lsps are not required to set a kind) +"ui.virtual.wrap" = { fg = "slate_gray" } # soft-wrap indicator +"ui.virtual.jump-label" = { modifiers = ["reversed"] } # virtual jump labels (g + w) +"ui.selection" = { bg = "deep_purple" } # slave selections in the editing area +"ui.selection.primary" = { bg = "light_purple" } # primary selection in the editing area +"ui.cursor" = { modifiers = ["reversed"] } # only if "ui.cursor.primary.normal" isn't set +"ui.cursor.normal" = { modifiers = ["reversed"] } # slave cursor block in normal mode +"ui.cursor.insert" = { bg = "rustic_red" } # slave cursor block in insert mode +"ui.cursor.select" = { bg = "deep_purple" } # slave cursor block in select mode +"ui.cursor.match" = { fg = "amber_shadow", bg = "blaze_orange", modifiers = ["bold"] } # matching bracket etc +"ui.cursor.primary" = { modifiers = ["reversed"] } # cursor with primary selection (has no effect due to "ui.cursor.primary.normal" is set) +"ui.cursor.primary.normal" = { modifiers = ["reversed"] } # cursor block in normal mode +"ui.cursor.primary.insert" = { fg = "amber_shadow", bg = "ruby_glow" } # cursor block in insert mode +"ui.cursor.primary.select" = { fg = "misty_white", bg = "deep_purple" } # cursor block in select mode (not the selected color) +"ui.cursorline.primary" = { bg = "dark_steel" } # line of the primary cursor +"ui.cursorline.secondary" = { bg = "midnight_black"} # lines of secondary cursors +"ui.cursorcolumn.primary" = { bg = "dark_steel" } # column of the primary cursor +"ui.cursorcolumn.secondary" = { bg = "midnight_black" } # columns of secondary cursors + +# USER INTERFACE - MENUS AND POPUP +"ui.popup" = { fg = "misty_white", bg = "midnight_black" } # documentation popups (space + k) +"ui.popup.info" = { fg = "misty_white", bg = "midnight_black" } # prompt for multiple key options, menu border (space, g, z, m, etc) +"ui.window" = { fg = "pitch_black" } # borderlines separating splits +"ui.help" = { fg = "misty_white", bg = "midnight_black" } # description box for commands +"ui.text" = { fg = "white" } # default text style, command prompts, popup text, etc +"ui.text.focus" = { fg = "leafy_green" } # the currently selected line in the picker (space j, space f, space s, etc) +"ui.text.inactive" = { fg = "slate_gray" } # same as ui.text but when the text is inactive e.g. suggestions +"ui.text.info" = { fg = "misty_white", bg = "midnight_black" } # the key: command in ui.popup.info boxes (space, g, z, m, etc) +"ui.menu" = { fg = "ethereal_gray", bg = "pitch_black" } # code and command completion menus ":" +"ui.menu.selected" = { fg = "misty_white", bg = "dark_steel" } # selected autocomplete item +"ui.menu.scroll" = { fg = "slate_gray", bg = "midnight_black" } # scrollbar +"ui.highlight" = { underline = { color = "blaze_orange", style = "line" } } # highlighted lines in the picker preview + +# User Interface - Diagnostics +"warning" = { fg = "lemon_zest" } # diagnostics warning (gutter) +"error" = { fg = "ruby_glow" } # diagnostics error (gutter) +"info" = { fg = "sky_blue" } # diagnostics info (gutter) +"hint" = { fg = "walnut_brown" } # diagnostics hint (gutter) +"diagnostic" = { modifiers = ["reversed"] } # diagnostics fallback style (editing area) +"diagnostic.hint" = { fg = "amber_shadow", bg = "walnut_brown" } # diagnostics hint (editing area) +"diagnostic.info" = { fg = "misty_white", bg = "twilight_slate" } # diagnostics info (editing area) +"diagnostic.warning" = { fg = "misty_white", bg = "rustic_amber" } # diagnostics warning (editing area) +"diagnostic.error" = { fg = "misty_white", bg = "rustic_red" } # diagnostics error (editing area) + +# COLOR NAMES +[palette] +# PALETTE USER INTERFACE +amber_shadow = "#0d1117" +midnight_black = "#010409" +dark_steel = "#161b22" +pitch_black = "#000000" +misty_white = "#f2f0eb" +slate_gray = "#838a97" +ethereal_gray = "#91a3b0" +blaze_orange = "#ff9000" +lemon_zest = "#ffba00" +leafy_green = "#81be83" +dreamy_blue = "#6eb0ff" +crystal_blue = "#99c7ff" +twilight_slate = "#263c57" +sky_blue = "#45b1e8" +rustic_red = "#540b0c" +ruby_glow = "#fa7970" +walnut_brown = "#987654" +rustic_amber = "#9d5800" +slate_purple = "#d2a8ff" +light_purple = "#7533bd" +deep_purple = "#4c1785" + +# PALETTE SYNTAX HIGHLIGHTING +black = "#0d1117" +red = "#fa7970" +green = "#81be83" +yellow = "#ffba00" +orange = "#ff9000" +blue = "#45b1e8" +purple = "#d2a8ff" +brown = "#987654" +gray = "#838a97" +white = "#dadada"