diff options
Diffstat (limited to 'runtime')
141 files changed, 4229 insertions, 165 deletions
diff --git a/runtime/queries/bash/injections.scm b/runtime/queries/bash/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/bash/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/c-sharp/injections.scm b/runtime/queries/c-sharp/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/c-sharp/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/c/indents.toml b/runtime/queries/c/indents.toml new file mode 100644 index 00000000..f4076e17 --- /dev/null +++ b/runtime/queries/c/indents.toml @@ -0,0 +1,16 @@ +indent = [ + "compound_statement", + "field_declaration_list", + "enumerator_list", + "parameter_list", + "init_declarator", + "case_statement", + "condition_clause", + "expression_statement", +] + +outdent = [ + "case", + "}", + "]", +] diff --git a/runtime/queries/c/injections.scm b/runtime/queries/c/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/c/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/c/textobjects.scm b/runtime/queries/c/textobjects.scm new file mode 100644 index 00000000..b0f03668 --- /dev/null +++ b/runtime/queries/c/textobjects.scm @@ -0,0 +1,13 @@ +(function_definition + body: (_) @function.inside) @function.around + +(struct_specifier + body: (_) @class.inside) @class.around + +(enum_specifier + body: (_) @class.inside) @class.around + +(union_specifier + body: (_) @class.inside) @class.around + +(parameter_declaration) @parameter.inside diff --git a/runtime/queries/cmake/indents.toml b/runtime/queries/cmake/indents.toml new file mode 100644 index 00000000..8b886a4f --- /dev/null +++ b/runtime/queries/cmake/indents.toml @@ -0,0 +1,12 @@ +indent = [ + "if_condition", + "foreach_loop", + "while_loop", + "function_def", + "macro_def", + "normal_command", +] + +outdent = [ + ")" +] diff --git a/runtime/queries/cmake/injections.scm b/runtime/queries/cmake/injections.scm new file mode 100644 index 00000000..6cb6c254 --- /dev/null +++ b/runtime/queries/cmake/injections.scm @@ -0,0 +1,4 @@ +((line_comment) @injection.content + (#set! injection.language "comment")) +((bracket_comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/cmake/textobjects.scm b/runtime/queries/cmake/textobjects.scm new file mode 100644 index 00000000..b0d1b108 --- /dev/null +++ b/runtime/queries/cmake/textobjects.scm @@ -0,0 +1,3 @@ +(macro_def) @function.around + +(argument) @parameter.inside diff --git a/runtime/queries/comment/highlights.scm b/runtime/queries/comment/highlights.scm new file mode 100644 index 00000000..88685d59 --- /dev/null +++ b/runtime/queries/comment/highlights.scm @@ -0,0 +1,30 @@ +[ + "(" + ")" +] @punctuation.bracket + +":" @punctuation.delimiter + +((tag (name) @warning) + (#match? @warning "^(TODO|HACK|WARNING)$")) + +("text" @warning + (#match? @warning "^(TODO|HACK|WARNING)$")) + +((tag (name) @error) + (match? @error "^(FIXME|XXX|BUG)$")) + +("text" @error + (match? @error "^(FIXME|XXX|BUG)$")) + +(tag + (name) @ui.text + (user)? @constant) + +; Issue number (#123) +("text" @constant.numeric + (#match? @constant.numeric "^#[0-9]+$")) + +; User mention (@user) +("text" @tag + (#match? @tag "^[@][a-zA-Z0-9_-]+$")) diff --git a/runtime/queries/cpp/indents.toml b/runtime/queries/cpp/indents.toml new file mode 100644 index 00000000..0ca2ed8b --- /dev/null +++ b/runtime/queries/cpp/indents.toml @@ -0,0 +1,17 @@ +indent = [ + "compound_statement", + "field_declaration_list", + "enumerator_list", + "parameter_list", + "init_declarator", + "case_statement", + "condition_clause", + "expression_statement", +] + +outdent = [ + "case", + "access_specifier", + "}", + "]", +] diff --git a/runtime/queries/cpp/injections.scm b/runtime/queries/cpp/injections.scm new file mode 100644 index 00000000..a5a5208c --- /dev/null +++ b/runtime/queries/cpp/injections.scm @@ -0,0 +1 @@ +; inherits: c diff --git a/runtime/queries/cpp/textobjects.scm b/runtime/queries/cpp/textobjects.scm new file mode 100644 index 00000000..6e3de1a2 --- /dev/null +++ b/runtime/queries/cpp/textobjects.scm @@ -0,0 +1,7 @@ +; inherits: c + +(lambda_expression + body: (_) @function.inside) @function.around + +(class_specifier + body: (_) @class.inside) @class.around diff --git a/runtime/queries/css/injections.scm b/runtime/queries/css/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/css/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/dart/highlights.scm b/runtime/queries/dart/highlights.scm new file mode 100644 index 00000000..9f667d6b --- /dev/null +++ b/runtime/queries/dart/highlights.scm @@ -0,0 +1,237 @@ +(dotted_identifier_list) @string + +; Methods +; -------------------- +(super) @function.builtin + +(function_expression_body (identifier) @function.method) +((identifier)(selector (argument_part)) @function.method) + +; Annotations +; -------------------- +(annotation + name: (identifier) @attribute) +(marker_annotation + name: (identifier) @attribute) + +; Types +; -------------------- +(class_definition + name: (identifier) @type) + +(constructor_signature + name: (identifier) @function.method) + +(function_signature + name: (identifier) @function.method) + +(getter_signature + (identifier) @function.builtin) + +(setter_signature + name: (identifier) @function.builtin) + +(enum_declaration + name: (identifier) @type) + +(enum_constant + name: (identifier) @type.builtin) + +(void_type) @type.builtin + +((scoped_identifier + scope: (identifier) @type) + (#match? @type "^[a-zA-Z]")) + +((scoped_identifier + scope: (identifier) @type + name: (identifier) @type) + (#match? @type "^[a-zA-Z]")) + +; the DisabledDrawerButtons in : const DisabledDrawerButtons(history: true), +(type_identifier) @type.builtin + +; Variables +; -------------------- +; the "File" in var file = File(); +((identifier) @namespace + (#match? @namespace "^_?[A-Z].*[a-z]")) ; catch Classes or IClasses not CLASSES + +("Function" @type.builtin) +(inferred_type) @type.builtin + +; properties +(unconditional_assignable_selector + (identifier) @variable.other.member) + +(conditional_assignable_selector + (identifier) @variable.other.member) + +; assignments +; -------------------- +; the "strings" in : strings = "some string" +(assignment_expression + left: (assignable_expression) @variable) + +(this) @variable.builtin + +; Parameters +; -------------------- +(formal_parameter + name: (identifier) @variable) + +(named_argument + (label (identifier) @variable)) + +; Literals +; -------------------- +[ + (hex_integer_literal) + (decimal_integer_literal) + (decimal_floating_point_literal) + ;(octal_integer_literal) + ;(hex_floating_point_literal) +] @constant.numeric.integer + +(symbol_literal) @string.special.symbol +(string_literal) @string + +[ + (const_builtin) + (final_builtin) +] @variable.builtin + +[ + (true) + (false) +] @constant.builtin.boolean + +(null_literal) @constant.builtin + +(comment) @comment.line +(documentation_comment) @comment.block.documentation + +; Tokens +; -------------------- +(template_substitution + "$" @punctuation.special + "{" @punctuation.special + "}" @punctuation.special +) @embedded + +(template_substitution + "$" @punctuation.special + (identifier_dollar_escaped) @variable +) @embedded + +(escape_sequence) @constant.character.escape + +; Punctuation +;--------------------- +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + ";" + "." + "," + ":" +] @punctuation.delimiter + +; Operators +;--------------------- +[ + "@" + "?" + "=>" + ".." + "==" + "&&" + "%" + "<" + ">" + "=" + ">=" + "<=" + "||" + (multiplicative_operator) + (increment_operator) + (is_operator) + (prefix_operator) + (equality_operator) + (additive_operator) +] @operator + +; Keywords +; -------------------- +["import" "library" "export"] @keyword.control.import +["do" "while" "continue" "for"] @keyword.control.repeat +["return" "yield"] @keyword.control.return +["as" "in" "is"] @keyword.operator + +[ + "?." + "??" + "if" + "else" + "switch" + "default" + "late" +] @keyword.control.conditional + +[ + "try" + "throw" + "catch" + "finally" + (break_statement) +] @keyword.control.exception + +; Reserved words (cannot be used as identifiers) +[ + (case_builtin) + "abstract" + "async" + "async*" + "await" + "class" + "covariant" + "deferred" + "dynamic" + "enum" + "extends" + "extension" + "external" + "factory" + "Function" + "get" + "implements" + "interface" + "mixin" + "new" + "on" + "operator" + "part" + "required" + "set" + "show" + "static" + "super" + "sync*" + "typedef" + "with" +] @keyword + +; when used as an identifier: +((identifier) @variable.builtin + (#match? @variable.builtin "^(abstract|as|covariant|deferred|dynamic|export|external|factory|Function|get|implements|import|interface|library|operator|mixin|part|set|static|typedef)$")) + +; Error +(ERROR) @error + diff --git a/runtime/queries/dart/indents.toml b/runtime/queries/dart/indents.toml new file mode 100644 index 00000000..5c11e05d --- /dev/null +++ b/runtime/queries/dart/indents.toml @@ -0,0 +1,20 @@ +indent = [ + "class_body", + "function_body", + "function_expression_body", + "declaration", + "initializers", + "switch_block", + "if_statement", + "formal_parameter_list", + "formal_parameter", + "list_literal", + "return_statement", + "arguments" +] + +outdent = [ + "}", + "]", + ")" +] diff --git a/runtime/queries/dart/injections.scm b/runtime/queries/dart/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/dart/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/dart/locals.scm b/runtime/queries/dart/locals.scm new file mode 100644 index 00000000..629838e5 --- /dev/null +++ b/runtime/queries/dart/locals.scm @@ -0,0 +1,20 @@ +; Scopes +;------- + +[ + (block) + (try_statement) + (catch_clause) + (finally_clause) +] @local.scope + +; Definitions +;------------ + +(class_definition + body: (_) @local.definition) + +; References +;------------ + +(identifier) @local.reference diff --git a/runtime/queries/dockerfile/highlights.scm b/runtime/queries/dockerfile/highlights.scm new file mode 100644 index 00000000..5a945fb9 --- /dev/null +++ b/runtime/queries/dockerfile/highlights.scm @@ -0,0 +1,51 @@ +[ + "FROM" + "AS" + "RUN" + "CMD" + "LABEL" + "EXPOSE" + "ENV" + "ADD" + "COPY" + "ENTRYPOINT" + "VOLUME" + "USER" + "WORKDIR" + "ARG" + "ONBUILD" + "STOPSIGNAL" + "HEALTHCHECK" + "SHELL" + "MAINTAINER" + "CROSS_BUILD" +] @keyword + +[ + ":" + "@" +] @operator + +(comment) @comment + + +(image_spec + (image_tag + ":" @punctuation.special) + (image_digest + "@" @punctuation.special)) + +(double_quoted_string) @string + +(expansion + [ + "$" + "{" + "}" + ] @punctuation.special +) @none + +((variable) @constant + (#match? @constant "^[A-Z][A-Z_0-9]*$")) + + diff --git a/runtime/queries/dockerfile/injections.scm b/runtime/queries/dockerfile/injections.scm new file mode 100644 index 00000000..20396f1a --- /dev/null +++ b/runtime/queries/dockerfile/injections.scm @@ -0,0 +1,6 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +([(shell_command) (shell_fragment)] @injection.content + (#set! injection.language "bash")) + diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm new file mode 100644 index 00000000..8370a0d8 --- /dev/null +++ b/runtime/queries/elixir/injections.scm @@ -0,0 +1,9 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +((sigil + (sigil_name) @_sigil_name + (quoted_content) @injection.content) + (#match? @_sigil_name "^(r|R)$") + (#set! injection.language "regex") + (#set! injection.combined)) diff --git a/runtime/queries/elm/highlights.scm b/runtime/queries/elm/highlights.scm new file mode 100644 index 00000000..3c8fd12d --- /dev/null +++ b/runtime/queries/elm/highlights.scm @@ -0,0 +1,83 @@ +; Keywords +[ + "if" + "then" + "else" + "let" + "in" + ] @keyword.control +(case) @keyword.control +(of) @keyword.control + +(colon) @keyword.operator +(backslash) @keyword +(as) @keyword +(port) @keyword +(exposing) @keyword +(alias) @keyword +(infix) @keyword + +(arrow) @keyword.operator +(dot) @keyword.operator + +(port) @keyword + +(type_annotation(lower_case_identifier) @function) +(port_annotation(lower_case_identifier) @function) +(file (value_declaration (function_declaration_left(lower_case_identifier) @function))) + +(field name: (lower_case_identifier) @attribute) +(field_access_expr(lower_case_identifier) @attribute) + +(operator_identifier) @keyword.operator +(eq) @keyword.operator.assignment + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +"|" @keyword +"," @punctuation.delimiter + +[ + "|>" +] @keyword + + +(import) @keyword.contol.import +(module) @keyword.other + +(number_constant_expr) @constant.numeric + +(type) @type + +(type_declaration(upper_case_identifier) @type) +(type_ref) @type +(type_alias_declaration name: (upper_case_identifier) @type) + +(union_pattern constructor: (upper_case_qid (upper_case_identifier) @label (dot) (upper_case_identifier) @variable.other.member)) +(union_pattern constructor: (upper_case_qid (upper_case_identifier) @variable.other.member)) + +(union_variant(upper_case_identifier) @variable.other.member) +(value_expr name: (value_qid (upper_case_identifier) @label)) +(value_expr (upper_case_qid (upper_case_identifier) @label (dot) (upper_case_identifier) @variable.other.member)) +(value_expr(upper_case_qid(upper_case_identifier)) @variable.other.member) + +; comments +(line_comment) @comment +(block_comment) @comment + +; strings +(string_escape) @constant.character.escape + +(open_quote) @string +(close_quote) @string +(regular_string_part) @string + +(open_char) @constant.character +(close_char) @constant.character diff --git a/runtime/queries/elm/injections.scm b/runtime/queries/elm/injections.scm new file mode 100644 index 00000000..83f8245c --- /dev/null +++ b/runtime/queries/elm/injections.scm @@ -0,0 +1,4 @@ +; Parse glsl where defined + +((glsl_content) @injection.content + (#set! injection.language "glsl")) diff --git a/runtime/queries/elm/locals.scm b/runtime/queries/elm/locals.scm new file mode 100644 index 00000000..ab103115 --- /dev/null +++ b/runtime/queries/elm/locals.scm @@ -0,0 +1,14 @@ +(value_declaration) @local.scope +(type_alias_declaration) @local.scope +(type_declaration) @local.scope +(type_annotation) @local.scope +(port_annotation) @local.scope +(infix_declaration) @local.scope +(let_in_expr) @local.scope + +(function_declaration_left (lower_pattern (lower_case_identifier)) @local.definition) +(function_declaration_left (lower_case_identifier) @local.definition) + +(value_expr(value_qid(upper_case_identifier)) @local.reference) +(value_expr(value_qid(lower_case_identifier)) @local.reference) +(type_ref (upper_case_qid) @local.reference) diff --git a/runtime/queries/elm/tags.scm b/runtime/queries/elm/tags.scm new file mode 100644 index 00000000..03999fb1 --- /dev/null +++ b/runtime/queries/elm/tags.scm @@ -0,0 +1,19 @@ +(value_declaration (function_declaration_left (lower_case_identifier) @name)) @definition.function + +(function_call_expr (value_expr (value_qid) @name)) @reference.function +(exposed_value (lower_case_identifier) @name) @reference.function +(type_annotation ((lower_case_identifier) @name) (colon)) @reference.function + +(type_declaration ((upper_case_identifier) @name) ) @definition.type + +(type_ref (upper_case_qid (upper_case_identifier) @name)) @reference.type +(exposed_type (upper_case_identifier) @name) @reference.type + +(type_declaration (union_variant (upper_case_identifier) @name)) @definition.union + +(value_expr (upper_case_qid (upper_case_identifier) @name)) @reference.union + + +(module_declaration + (upper_case_qid (upper_case_identifier)) @name +) @definition.module diff --git a/runtime/queries/fish/highlights.scm b/runtime/queries/fish/highlights.scm new file mode 100644 index 00000000..def53931 --- /dev/null +++ b/runtime/queries/fish/highlights.scm @@ -0,0 +1,156 @@ +;; Operators + +[ + "&&" + "||" + "|" + "&" + "=" + "!=" + ".." + "!" + (direction) + (stream_redirect) + (test_option) +] @operator + +[ + "not" + "and" + "or" +] @keyword.operator + +;; Conditionals + +(if_statement +[ + "if" + "end" +] @keyword.control.conditional) + +(switch_statement +[ + "switch" + "end" +] @keyword.control.conditional) + +(case_clause +[ + "case" +] @keyword.control.conditional) + +(else_clause +[ + "else" +] @keyword.control.conditional) + +(else_if_clause +[ + "else" + "if" +] @keyword.control.conditional) + +;; Loops/Blocks + +(while_statement +[ + "while" + "end" +] @keyword.control.repeat) + +(for_statement +[ + "for" + "end" +] @keyword.control.repeat) + +(begin_statement +[ + "begin" + "end" +] @keyword.control.repeat) + +;; Keywords + +[ + "in" + (break) + (continue) +] @keyword + +"return" @keyword.control.return + +;; Punctuation + +[ + "[" + "]" + "{" + "}" + "(" + ")" +] @punctuation.bracket + +"," @punctuation.delimiter + +;; Commands + +(command + argument: [ + (word) @variable.parameter (#match? @variable.parameter "^-") + ] +) + +; non-bultin command names +(command name: (word) @function) + +; derived from builtin -n (fish 3.2.2) +(command + name: [ + (word) @function.builtin + (#match? @function.builtin "^(\.|:|_|alias|argparse|bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|contains|count|disown|echo|emit|eval|exec|exit|fg|functions|history|isatty|jobs|math|printf|pwd|random|read|realpath|set|set_color|source|status|string|test|time|type|ulimit|wait)$") + ] +) + +(test_command "test" @function.builtin) + +;; Functions + +(function_definition ["function" "end"] @keyword.function) + +(function_definition + name: [ + (word) (concatenation) + ] +@function) + +(function_definition + option: [ + (word) + (concatenation (word)) + ] @variable.parameter (#match? @variable.parameter "^-") +) + +;; Strings + +[(double_quote_string) (single_quote_string)] @string +(escape_sequence) @constant.character.escape + +;; Variables + +(variable_name) @variable +(variable_expansion) @constant + +;; Nodes + +(integer) @constant.numeric.integer +(float) @constant.numeric.float +(comment) @comment +(test_option) @string + +((word) @constant.builtin.boolean +(#match? @constant.builtin.boolean "^(true|false)$")) + +;; Error + +(ERROR) @error diff --git a/runtime/queries/fish/indents.toml b/runtime/queries/fish/indents.toml new file mode 100644 index 00000000..6f1e563a --- /dev/null +++ b/runtime/queries/fish/indents.toml @@ -0,0 +1,12 @@ +indent = [ + "function_definition", + "while_statement", + "for_statement", + "if_statement", + "begin_statement", + "switch_statement", +] + +outdent = [ + "end" +] diff --git a/runtime/queries/fish/injections.scm b/runtime/queries/fish/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/fish/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/fish/textobjects.scm b/runtime/queries/fish/textobjects.scm new file mode 100644 index 00000000..67fd6614 --- /dev/null +++ b/runtime/queries/fish/textobjects.scm @@ -0,0 +1 @@ +(function_definition) @function.around diff --git a/runtime/queries/git-commit/highlights.scm b/runtime/queries/git-commit/highlights.scm new file mode 100644 index 00000000..0b50d419 --- /dev/null +++ b/runtime/queries/git-commit/highlights.scm @@ -0,0 +1,14 @@ +(subject) @markup.heading +(path) @string.special.path +(branch) @string.special.symbol +(commit) @constant +(item) @markup.link.url +(header) @tag + +(change kind: "new file" @diff.plus) +(change kind: "deleted" @diff.minus) +(change kind: "modified" @diff.delta) +(change kind: "renamed" @diff.delta.moved) + +[":" "->"] @punctuation.delimeter +(comment) @comment diff --git a/runtime/queries/git-commit/injections.scm b/runtime/queries/git-commit/injections.scm new file mode 100644 index 00000000..cf0657f7 --- /dev/null +++ b/runtime/queries/git-commit/injections.scm @@ -0,0 +1,8 @@ +((comment (scissors)) + (message) @injection.content + (#set! injection.include-children) + (#set! injection.language "diff")) + +((rebase_command) @injection.content + (#set! injection.include-children) + (#set! injection.language "git-rebase")) diff --git a/runtime/queries/git-config/highlights.scm b/runtime/queries/git-config/highlights.scm new file mode 100644 index 00000000..84767edc --- /dev/null +++ b/runtime/queries/git-config/highlights.scm @@ -0,0 +1,27 @@ +((section_name) @keyword.directive + (#eq? @keyword.directive "include")) + +((section_header + (section_name) @keyword.directive + (subsection_name)) + (#eq? @keyword.directive "includeIf")) + +(section_name) @markup.heading +(variable (name) @variable.other.member) +[(true) (false)] @constant.builtin.boolean +(integer) @constant.numeric.integer + +((string) @string.special.path + (#match? @string.special.path "^(~|./|/)")) + +[(string) (subsection_name)] @string + +[ + "[" + "]" + "\"" +] @punctuation.bracket + +"=" @punctuation.delimiter + +(comment) @comment diff --git a/runtime/queries/git-diff/highlights.scm b/runtime/queries/git-diff/highlights.scm new file mode 100644 index 00000000..1c1a8829 --- /dev/null +++ b/runtime/queries/git-diff/highlights.scm @@ -0,0 +1,6 @@ +[(addition) (new_file)] @diff.plus +[(deletion) (old_file)] @diff.minus + +(commit) @constant +(location) @attribute +(command) @markup.bold diff --git a/runtime/queries/git-rebase/highlights.scm b/runtime/queries/git-rebase/highlights.scm new file mode 100644 index 00000000..4f007037 --- /dev/null +++ b/runtime/queries/git-rebase/highlights.scm @@ -0,0 +1,11 @@ +(operation operator: ["p" "pick" "r" "reword" "e" "edit" "s" "squash" "m" "merge" "d" "drop" "b" "break" "x" "exec"] @keyword) +(operation operator: ["l" "label" "t" "reset"] @function) +(operation operator: ["f" "fixup"] @function.special) + +(option) @operator +(label) @string.special.symbol +(commit) @constant +"#" @punctuation.delimiter +(comment) @comment + +(ERROR) @error diff --git a/runtime/queries/git-rebase/injections.scm b/runtime/queries/git-rebase/injections.scm new file mode 100644 index 00000000..070129b6 --- /dev/null +++ b/runtime/queries/git-rebase/injections.scm @@ -0,0 +1,4 @@ +((operation + operator: ["x" "exec"] + (command) @injection.content) + (#set! injection.language "bash")) diff --git a/runtime/queries/glsl/injections.scm b/runtime/queries/glsl/injections.scm index 7d3323b1..6330ea3e 100644 --- a/runtime/queries/glsl/injections.scm +++ b/runtime/queries/glsl/injections.scm @@ -1,3 +1,4 @@ -(preproc_arg) @glsl +; inherits: c -(comment) @comment +((preproc_arg) @injection.content + (#set! injection.language "glsl")) diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm index 56384d4d..4ff8675b 100644 --- a/runtime/queries/go/highlights.scm +++ b/runtime/queries/go/highlights.scm @@ -69,6 +69,7 @@ "|" "|=" "||" + "~" ] @operator ; Keywords @@ -143,6 +144,9 @@ (false) ] @constant.builtin.boolean -(nil) @constant.builtin +[ + (nil) + (iota) +] @constant.builtin (comment) @comment diff --git a/runtime/queries/go/injections.scm b/runtime/queries/go/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/go/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/graphql/highlights.scm b/runtime/queries/graphql/highlights.scm new file mode 100644 index 00000000..9fab4051 --- /dev/null +++ b/runtime/queries/graphql/highlights.scm @@ -0,0 +1,163 @@ +; Types +;------ + +(scalar_type_definition + (name) @type) + +(object_type_definition + (name) @type) + +(interface_type_definition + (name) @type) + +(union_type_definition + (name) @type) + +(enum_type_definition + (name) @type) + +(input_object_type_definition + (name) @type) + +(directive_definition + (name) @type) + +(directive_definition + "@" @type) + +(scalar_type_extension + (name) @type) + +(object_type_extension + (name) @type) + +(interface_type_extension + (name) @type) + +(union_type_extension + (name) @type) + +(enum_type_extension + (name) @type) + +(input_object_type_extension + (name) @type) + +(named_type + (name) @type) + +(directive) @type + +; Properties +;----------- + +(field + (name) @variable.other.member) + +(field + (alias + (name) @variable.other.member)) + +(field_definition + (name) @variable.other.member) + +(object_value + (object_field + (name) @variable.other.member)) + +(enum_value + (name) @variable.other.member) + +; Variable Definitions and Arguments +;----------------------------------- + +(operation_definition + (name) @variable) + +(fragment_name + (name) @variable) + +(input_fields_definition + (input_value_definition + (name) @variable.parameter)) + +(argument + (name) @variable.parameter) + +(arguments_definition + (input_value_definition + (name) @variable.parameter)) + +(variable_definition + (variable) @variable.parameter) + +(argument + (value + (variable) @variable)) + +; Constants +;---------- + +(string_value) @string + +(int_value) @constants.numeric.integer + +(float_value) @constants.numeric.float + +(boolean_value) @constants.builtin.boolean + +; Literals +;--------- + +(description) @comment + +(comment) @comment + +(directive_location + (executable_directive_location) @type.builtin) + +(directive_location + (type_system_directive_location) @type.builtin) + +; Keywords +;---------- + +[ + "query" + "mutation" + "subscription" + "fragment" + "scalar" + "type" + "interface" + "union" + "enum" + "input" + "extend" + "directive" + "schema" + "on" + "repeatable" + "implements" +] @keyword + +; Punctuation +;------------ + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +"=" @operator + +"|" @punctuation.delimiter +"&" @punctuation.delimiter +":" @punctuation.delimiter + +"..." @punctuation.special +"!" @punctuation.special diff --git a/runtime/queries/haskell/highlights.scm b/runtime/queries/haskell/highlights.scm index 72187876..5009f3b5 100644 --- a/runtime/queries/haskell/highlights.scm +++ b/runtime/queries/haskell/highlights.scm @@ -1,45 +1,125 @@ -(variable) @variable -(operator) @operator -(exp_name (constructor) @constructor) -(constructor_operator) @operator -(module) @namespace -(type) @type -(type) @class -(constructor) @constructor -(pragma) @pragma -(comment) @comment -(signature name: (variable) @fun_type_name) -(function name: (variable) @function) -(constraint class: (class_name (type)) @class) -(class (class_head class: (class_name (type)) @class)) -(instance (instance_head class: (class_name (type)) @class)) +;; ---------------------------------------------------------------------------- +;; Literals and comments + (integer) @constant.numeric.integer +(exp_negation) @constant.numeric.integer (exp_literal (float)) @constant.numeric.float (char) @constant.character -(con_unit) @literal -(con_list) @literal -(tycon_arrow) @operator -(where) @keyword -"module" @keyword -"let" @keyword -"in" @keyword -"class" @keyword -"instance" @keyword -"data" @keyword -"newtype" @keyword -"family" @keyword -"type" @keyword -"import" @keyword -"qualified" @keyword -"as" @keyword -"deriving" @keyword -"via" @keyword -"stock" @keyword -"anyclass" @keyword -"do" @keyword -"mdo" @keyword -"rec" @keyword +(string) @string + +(con_unit) @constant.builtin ; unit, as in () + +(comment) @comment + + +;; ---------------------------------------------------------------------------- +;; Punctuation + [ "(" ")" + "{" + "}" + "[" + "]" ] @punctuation.bracket + +[ + (comma) + ";" +] @punctuation.delimiter + + +;; ---------------------------------------------------------------------------- +;; Keywords, operators, includes + +(pragma) @constant.macro + +[ + "if" + "then" + "else" + "case" + "of" +] @keyword.control.conditional + +[ + "import" + "qualified" + "module" +] @keyword.control.import + +[ + (operator) + (constructor_operator) + (type_operator) + (tycon_arrow) + (qualified_module) ; grabs the `.` (dot), ex: import System.IO + (all_names) + (wildcard) + "=" + "|" + "::" + "=>" + "->" + "<-" + "\\" + "`" + "@" +] @operator + +(qualified_module (module) @constructor) +(qualified_type (module) @namespace) +(qualified_variable (module) @namespace) +(import (module) @namespace) + +[ + (where) + "let" + "in" + "class" + "instance" + "data" + "newtype" + "family" + "type" + "as" + "hiding" + "deriving" + "via" + "stock" + "anyclass" + "do" + "mdo" + "rec" + "forall" + "∀" + "infix" + "infixl" + "infixr" +] @keyword + + +;; ---------------------------------------------------------------------------- +;; Functions and variables + +(signature name: (variable) @type) +(function name: (variable) @function) + +(variable) @variable +"_" @variable.builtin + +(exp_infix (variable) @operator) ; consider infix functions as operators + +("@" @namespace) ; "as" pattern operator, e.g. x@Constructor + + +;; ---------------------------------------------------------------------------- +;; Types + +(type) @type + +(constructor) @constructor + +; True or False +((constructor) @_bool (#match? @_bool "(True|False)")) @constant.builtin.boolean diff --git a/runtime/queries/haskell/injections.scm b/runtime/queries/haskell/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/haskell/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/html/injections.scm b/runtime/queries/html/injections.scm index 71e7c3ae..ef58f415 100644 --- a/runtime/queries/html/injections.scm +++ b/runtime/queries/html/injections.scm @@ -1,3 +1,6 @@ +((comment) @injection.content + (#set! injection.language "comment")) + ((script_element (raw_text) @injection.content) (#set! injection.language "javascript")) diff --git a/runtime/queries/iex/highlights.scm b/runtime/queries/iex/highlights.scm new file mode 100644 index 00000000..2847fbff --- /dev/null +++ b/runtime/queries/iex/highlights.scm @@ -0,0 +1 @@ +(prompt) @comment diff --git a/runtime/queries/iex/injections.scm b/runtime/queries/iex/injections.scm new file mode 100644 index 00000000..48863d9d --- /dev/null +++ b/runtime/queries/iex/injections.scm @@ -0,0 +1,6 @@ +((evaluation_block (prompt_line (expression) @injection.content)) + (#set! injection.language "elixir") + (#set! injection.combined)) + +((result) @injection.content + (#set! injection.language "elixir")) diff --git a/runtime/queries/java/injections.scm b/runtime/queries/java/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/java/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/javascript/injections.scm b/runtime/queries/javascript/injections.scm index 5539241a..e8429111 100644 --- a/runtime/queries/javascript/injections.scm +++ b/runtime/queries/javascript/injections.scm @@ -9,6 +9,14 @@ ] arguments: (template_string) @injection.content) +; Parse the contents of gql template literals + +((call_expression + function: (identifier) @_template_function_name + arguments: (template_string) @injection.content) + (#eq? @_template_function_name "gql") + (#set! injection.language "graphql")) + ; Parse regex syntax within regex literals ((regex_pattern) @injection.content diff --git a/runtime/queries/julia/injections.scm b/runtime/queries/julia/injections.scm index be2412c0..1c1e804e 100644 --- a/runtime/queries/julia/injections.scm +++ b/runtime/queries/julia/injections.scm @@ -1,5 +1,5 @@ -; TODO: re-add when markdown is added. -; ((triple_string) @markdown -; (#offset! @markdown 0 3 0 -3)) +((triple_string) @injection.content + (#set! injection.language "markdown")) -(comment) @comment +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/julia/locals.scm b/runtime/queries/julia/locals.scm index f8b34f71..d5ac794e 100644 --- a/runtime/queries/julia/locals.scm +++ b/runtime/queries/julia/locals.scm @@ -2,24 +2,24 @@ (import_statement (identifier) @definition.import) (variable_declaration - (identifier) @definition.var) + (identifier) @local.definition) (variable_declaration (tuple_expression - (identifier) @definition.var)) + (identifier) @local.definition)) (for_binding - (identifier) @definition.var) + (identifier) @local.definition) (for_binding (tuple_expression - (identifier) @definition.var)) + (identifier) @local.definition)) (assignment_expression (tuple_expression - (identifier) @definition.var)) + (identifier) @local.definition)) (assignment_expression (bare_tuple_expression - (identifier) @definition.var)) + (identifier) @local.definition)) (assignment_expression - (identifier) @definition.var) + (identifier) @local.definition) (type_parameter_list (identifier) @definition.type) @@ -43,11 +43,11 @@ (identifier) @definition.parameter) (function_definition - name: (identifier) @definition.function) @scope + name: (identifier) @definition.function) @local.scope (macro_definition - name: (identifier) @definition.macro) @scope + name: (identifier) @definition.macro) @local.scope -(identifier) @reference +(identifier) @local.reference [ (try_statement) @@ -56,4 +56,4 @@ (let_statement) (compound_expression) (for_statement) -] @scope +] @local.scope diff --git a/runtime/queries/latex/highlights.scm b/runtime/queries/latex/highlights.scm index f045c82d..0a030b31 100644 --- a/runtime/queries/latex/highlights.scm +++ b/runtime/queries/latex/highlights.scm @@ -278,7 +278,7 @@ "\\includeinkscape" "\\usepgflibrary" "\\usetikzlibrary" -] @include +] @keyword.control.import [ "\\part" @@ -318,60 +318,60 @@ ["[" "]" "{" "}"] @punctuation.bracket ;"(" ")" is has no special meaning in LaTeX (chapter - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (part - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (section - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (subsection - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (subsubsection - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (paragraph - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) (subparagraph - text: (brace_group) @text.title) + text: (brace_group) @markup.heading) ((environment (begin name: (word) @_frame) (brace_group - child: (text) @text.title)) + child: (text) @markup.heading)) (#eq? @_frame "frame")) ((generic_command name:(generic_command_name) @_name arg: (brace_group - (text) @text.title)) + (text) @markup.heading)) (#eq? @_name "\\frametitle")) ;; Formatting ((generic_command name:(generic_command_name) @_name - arg: (_) @text.emphasis) + arg: (_) @markup.italic) (#eq? @_name "\\emph")) ((generic_command name:(generic_command_name) @_name - arg: (_) @text.emphasis) + arg: (_) @markup.italic) (#match? @_name "^(\\\\textit|\\\\mathit)$")) ((generic_command name:(generic_command_name) @_name - arg: (_) @text.strong) + arg: (_) @markup.bold) (#match? @_name "^(\\\\textbf|\\\\mathbf)$")) ((generic_command name:(generic_command_name) @_name . - arg: (_) @text.uri) + arg: (_) @markup.link.url) (#match? @_name "^(\\\\url|\\\\href)$")) (ERROR) @error diff --git a/runtime/queries/latex/injections.scm b/runtime/queries/latex/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/latex/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/lean/folds.scm b/runtime/queries/lean/folds.scm new file mode 100644 index 00000000..2c2bbb33 --- /dev/null +++ b/runtime/queries/lean/folds.scm @@ -0,0 +1,15 @@ +[ + (namespace) + (section) + + (instance) + (def) + (theorem) + (example) + + (product) + (array) + (list) + + (string) +] @fold diff --git a/runtime/queries/lean/highlights.scm b/runtime/queries/lean/highlights.scm new file mode 100644 index 00000000..a64feb1d --- /dev/null +++ b/runtime/queries/lean/highlights.scm @@ -0,0 +1,217 @@ +(open + namespace: (identifier) @namespace) +(namespace + name: (identifier) @namespace) +(section + name: (identifier) @namespace) + +;; Identifier naming conventions +((identifier) @type + (#match? @type "^[A-Z]")) + +(arrow) @type +(product) @type + +;; Declarations + +[ + "abbrev" + "def" + "theorem" + "constant" + "instance" + "axiom" + "example" + "inductive" + "structure" + "class" + + "deriving" + + "section" + "namespace" +] @keyword + +(attributes + (identifier) @function) + +(abbrev + name: (identifier) @type) +(def + name: (identifier) @function) +(theorem + name: (identifier) @function) +(constant + name: (identifier) @type) +(instance + name: (identifier) @function) +(instance + type: (identifier) @type) +(axiom + name: (identifier) @function) +(structure + name: (identifier) @type) +(structure + extends: (identifier) @type) + +(where_decl + type: (identifier) @type) + +(proj + name: (identifier) @field) + +(binders + type: (identifier) @type) + +["if" "then" "else"] @keyword.control.conditional + +["for" "in" "do"] @keyword.control.repeat + +(import) @include + +; Tokens + +[ + "!" + "$" + "%" + "&&" + "*" + "*>" + "+" + "++" + "-" + "/" + "::" + ":=" + "<" + "<$>" + "<*" + "<*>" + "<=" + "<|" + "<|>" + "=" + "==" + "=>" + ">" + ">" + ">=" + ">>" + ">>=" + "@" + "^" + "|>" + "|>." + "||" + "←" + "→" + "↔" + "∘" + "∧" + "∨" + "≠" + "≤" + "≥" +] @operator + +[ + "@&" +] @operator + +[ + "attribute" + "by" + "end" + "export" + "extends" + "fun" + "let" + "have" + "match" + "open" + "return" + "universe" + "variable" + "where" + "with" + "λ" + (hash_command) + (prelude) + (sorry) +] @keyword + +[ + "prefix" + "infix" + "infixl" + "infixr" + "postfix" + "notation" + "macro_rules" + "syntax" + "elab" + "builtin_initialize" +] @keyword + +[ + "noncomputable" + "partial" + "private" + "protected" + "unsafe" +] @keyword + +[ + "apply" + "exact" + "rewrite" + "rw" + "simp" + (trivial) +] @keyword + +[ + "catch" + "finally" + "try" +] @exception + +((apply + name: (identifier) @exception) + (#match? @exception "throw")) + +[ + "unless" + "mut" +] @keyword + +[(true) (false)] @boolean + +(number) @constant.numeric.integer +(float) @constant.numeric.float + +(comment) @comment +(char) @character +(string) @string +(interpolated_string) @string +; (escape_sequence) @string.escape + +; Reset highlighing in string interpolation +(interpolation) @none + +(interpolation + "{" @punctuation.special + "}" @punctuation.special) + +["(" ")" "[" "]" "{" "}" "⟨" "⟩"] @punctuation.bracket + +["|" "," "." ":" ";"] @punctuation.delimiter + +(sorry) @error + +;; Error +(ERROR) @error + +; Variables +(identifier) @variable diff --git a/runtime/queries/lean/injections.scm b/runtime/queries/lean/injections.scm new file mode 100644 index 00000000..030714f1 --- /dev/null +++ b/runtime/queries/lean/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "markdown")) diff --git a/runtime/queries/lean/locals.scm b/runtime/queries/lean/locals.scm new file mode 100644 index 00000000..dd6c2036 --- /dev/null +++ b/runtime/queries/lean/locals.scm @@ -0,0 +1,5 @@ +[ + (module) + (namespace) + (section) +] @local.scope diff --git a/runtime/queries/ledger/highlights.scm b/runtime/queries/ledger/highlights.scm index bdf5f2db..02a9ea9a 100644 --- a/runtime/queries/ledger/highlights.scm +++ b/runtime/queries/ledger/highlights.scm @@ -12,7 +12,7 @@ ((account) @variable.other.member) ((commodity) @text.literal) -"include" @include +"include" @keyword.local.import [ "account" diff --git a/runtime/queries/ledger/injections.scm b/runtime/queries/ledger/injections.scm index 2d948141..c1714786 100644 --- a/runtime/queries/ledger/injections.scm +++ b/runtime/queries/ledger/injections.scm @@ -1,2 +1,2 @@ -(comment) @comment -(note) @comment +([(comment) (note)] @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/llvm-mir-yaml/highlights.scm b/runtime/queries/llvm-mir-yaml/highlights.scm new file mode 100644 index 00000000..4ba254e8 --- /dev/null +++ b/runtime/queries/llvm-mir-yaml/highlights.scm @@ -0,0 +1 @@ +; inherits: yaml diff --git a/runtime/queries/llvm-mir-yaml/indents.toml b/runtime/queries/llvm-mir-yaml/indents.toml new file mode 100644 index 00000000..ddc3578b --- /dev/null +++ b/runtime/queries/llvm-mir-yaml/indents.toml @@ -0,0 +1,3 @@ +indent = [ + "block_mapping_pair", +] diff --git a/runtime/queries/llvm-mir-yaml/injections.scm b/runtime/queries/llvm-mir-yaml/injections.scm new file mode 100644 index 00000000..b3243022 --- /dev/null +++ b/runtime/queries/llvm-mir-yaml/injections.scm @@ -0,0 +1,9 @@ +; inherits: yaml + +((document (block_node (block_scalar) @injection.content)) + (#set! injection.language "llvm")) + +((document (block_node (block_mapping (block_mapping_pair + key: (flow_node (plain_scalar (string_scalar))) ; "body" + value: (block_node (block_scalar) @injection.content))))) + (#set! injection.language "mir")) diff --git a/runtime/queries/llvm-mir/highlights.scm b/runtime/queries/llvm-mir/highlights.scm new file mode 100644 index 00000000..79234612 --- /dev/null +++ b/runtime/queries/llvm-mir/highlights.scm @@ -0,0 +1,136 @@ +[ + (label) + (bb_ref) +] @label + +[ + (comment) + (multiline_comment) +] @comment + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" +] @punctuation.bracket + +[ + "," + ":" + "|" + "*" +] @punctuation.delimiter + +[ + "=" + "x" +] @operator + +[ + "true" + "false" +] @constant.builtin.boolean + +[ + "null" + "_" + "unknown-address" +] @constant.builtin + +[ + (stack_object) + (constant_pool_index) + (jump_table_index) + (var) + (physical_register) + (ir_block) + (external_symbol) + (global_var) + (ir_local_var) + (metadata_ref) + (mnemonic) +] @variable + +(low_level_type) @type + +[ + (immediate_type) + (primitive_type) +] @type.builtin + +(number) @constant.numeric.integer +(float) @constant.numeric.float +(string) @string + +(instruction name: _ @keyword.operator) + +[ + "successors" + "liveins" + "pre-instr-symbol" + "post-instr-symbol" + "heap-alloc-marker" + "debug-instr-number" + "debug-location" + "mcsymbol" + "tied-def" + "target-flags" + "CustomRegMask" + "same_value" + "def_cfa_register" + "restore" + "undefined" + "offset" + "rel_offset" + "def_cfa" + "llvm_def_aspace_cfa" + "register" + "escape" + "remember_state" + "restore_state" + "window_save" + "negate_ra_sign_state" + "intpred" + "floatpred" + "shufflemask" + "liveout" + "target-index" + "blockaddress" + "intrinsic" + "load" + "store" + "unknown-size" + "on" + "from" + "into" + "align" + "basealign" + "addrspace" + "call-entry" + "custom" + "constant-pool" + "stack" + "got" + "jump-table" + "syncscope" + "address-taken" + "landing-pad" + "inlineasm-br-indirect-target" + "ehfunclet-entry" + "bbsections" + + (intpred) + (floatpred) + (memory_operand_flag) + (atomic_ordering) + (register_flag) + (instruction_flag) + (float_keyword) +] @keyword + +(ERROR) @error diff --git a/runtime/queries/llvm-mir/indents.toml b/runtime/queries/llvm-mir/indents.toml new file mode 100644 index 00000000..6a70e5ad --- /dev/null +++ b/runtime/queries/llvm-mir/indents.toml @@ -0,0 +1,7 @@ +indent = [ + "basic_block", +] + +outdent = [ + "label", +] diff --git a/runtime/queries/llvm-mir/injections.scm b/runtime/queries/llvm-mir/injections.scm new file mode 100644 index 00000000..0b476f86 --- /dev/null +++ b/runtime/queries/llvm-mir/injections.scm @@ -0,0 +1,2 @@ +([ (comment) (multiline_comment)] @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/llvm-mir/textobjects.scm b/runtime/queries/llvm-mir/textobjects.scm new file mode 100644 index 00000000..73f6f772 --- /dev/null +++ b/runtime/queries/llvm-mir/textobjects.scm @@ -0,0 +1,3 @@ +(basic_block) @function.around + +(argument) @parameter.inside diff --git a/runtime/queries/llvm/highlights.scm b/runtime/queries/llvm/highlights.scm index 73afe85e..cb705197 100644 --- a/runtime/queries/llvm/highlights.scm +++ b/runtime/queries/llvm/highlights.scm @@ -1,14 +1,158 @@ (type) @type -(statement) @keyword.operator +(type_keyword) @type.builtin + +(type [ + (local_var) + (global_var) + ] @type) + +(argument) @variable.parameter + +(_ inst_name: _ @keyword.operator) + +[ + "catch" + "filter" +] @keyword.operator + +[ + "to" + "nuw" + "nsw" + "exact" + "unwind" + "from" + "cleanup" + "swifterror" + "volatile" + "inbounds" + "inrange" + (icmp_cond) + (fcmp_cond) + (fast_math) +] @keyword.control + +(_ callee: _ @function) +(function_header name: _ @function) + +[ + "declare" + "define" + (calling_conv) +] @keyword.function + +[ + "target" + "triple" + "datalayout" + "source_filename" + "addrspace" + "blockaddress" + "align" + "syncscope" + "within" + "uselistorder" + "uselistorder_bb" + "module" + "asm" + "sideeffect" + "alignstack" + "inteldialect" + "unwind" + "type" + "global" + "constant" + "externally_initialized" + "alias" + "ifunc" + "section" + "comdat" + "thread_local" + "localdynamic" + "initialexec" + "localexec" + "any" + "exactmatch" + "largest" + "nodeduplicate" + "samesize" + "distinct" + "attributes" + "vscale" + "no_cfi" + (linkage_aux) + (dso_local) + (visibility) + (dll_storage_class) + (unnamed_addr) + (attribute_name) +] @keyword + + +(function_header [ + (linkage) + (calling_conv) + (unnamed_addr) + ] @keyword.function) + +[ + (string) + (cstring) +] @string + (number) @constant.numeric.integer (comment) @comment -(string) @string (label) @label -(keyword) @keyword -"ret" @keyword.control.return -(boolean) @constant.builtin.boolean +(_ inst_name: "ret" @keyword.control.return) (float) @constant.numeric.float -(constant) @constant -(identifier) @variable -(symbol) @punctuation.delimiter -(bracket) @punctuation.bracket + +[ + (local_var) + (global_var) +] @variable + +[ + (struct_value) + (array_value) + (vector_value) +] @constructor + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" + "<{" + "}>" +] @punctuation.bracket + +[ + "," + ":" +] @punctuation.delimiter + +[ + "=" + "|" + "x" + "..." +] @operator + +[ + "true" + "false" +] @constant.builtin.boolean + +[ + "undef" + "poison" + "null" + "none" + "zeroinitializer" +] @constant.builtin + +(ERROR) @error diff --git a/runtime/queries/llvm/indents.toml b/runtime/queries/llvm/indents.toml new file mode 100644 index 00000000..8cd603c8 --- /dev/null +++ b/runtime/queries/llvm/indents.toml @@ -0,0 +1,8 @@ +indent = [ + "function_body", + "instruction", +] + +outdent = [ + "}", +] diff --git a/runtime/queries/llvm/injections.scm b/runtime/queries/llvm/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/llvm/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/llvm/locals.scm b/runtime/queries/llvm/locals.scm new file mode 100644 index 00000000..1946c287 --- /dev/null +++ b/runtime/queries/llvm/locals.scm @@ -0,0 +1,14 @@ +; Scopes + +(function_body) @local.scope + +; Definitions + +(argument + (value (var (local_var) @local.definition))) + +(instruction + (local_var) @local.definition) + +; References +(local_var) @local.reference diff --git a/runtime/queries/llvm/textobjects.scm b/runtime/queries/llvm/textobjects.scm new file mode 100644 index 00000000..3738a3bb --- /dev/null +++ b/runtime/queries/llvm/textobjects.scm @@ -0,0 +1,16 @@ +(define + body: (_) @function.inside) @function.around + +(struct_type + (struct_body) @class.inside) @class.around + +(packed_struct_type + (struct_body) @class.inside) @class.around + +(array_type + (array_vector_body) @class.inside) @class.around + +(vector_type + (array_vector_body) @class.inside) @class.around + +(argument) @parameter.inside diff --git a/runtime/queries/lua/injections.scm b/runtime/queries/lua/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/lua/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/make/highlights.scm b/runtime/queries/make/highlights.scm new file mode 100644 index 00000000..50380baf --- /dev/null +++ b/runtime/queries/make/highlights.scm @@ -0,0 +1,170 @@ +[ + "(" + ")" + "{" + "}" +] @punctuation.bracket + +[ + ":" + "&:" + "::" + "|" + ";" + "\"" + "'" + "," +] @punctuation.delimiter + +[ + "$" + "$$" +] @punctuation.special + +(automatic_variable + [ "@" "%" "<" "?" "^" "+" "/" "*" "D" "F"] @punctuation.special) + +(automatic_variable + "/" @error . ["D" "F"]) + +[ + "=" + ":=" + "::=" + "?=" + "+=" + "!=" + "@" + "-" + "+" +] @operator + +[ + (text) + (string) + (raw_text) +] @string + +(variable_assignment (word) @string) + +[ + "ifeq" + "ifneq" + "ifdef" + "ifndef" + "else" + "endif" + "if" + "or" ; boolean functions are conditional in make grammar + "and" +] @keyword.control.conditional + +"foreach" @keyword.control.repeat + +[ + "define" + "endef" + "vpath" + "undefine" + "export" + "unexport" + "override" + "private" +; "load" +] @keyword + +[ + "include" + "sinclude" + "-include" +] @keyword.control.import + +[ + "subst" + "patsubst" + "strip" + "findstring" + "filter" + "filter-out" + "sort" + "word" + "words" + "wordlist" + "firstword" + "lastword" + "dir" + "notdir" + "suffix" + "basename" + "addsuffix" + "addprefix" + "join" + "wildcard" + "realpath" + "abspath" + "call" + "eval" + "file" + "value" + "shell" +] @keyword.function + +[ + "error" + "warning" + "info" +] @keyword.control.exception + +;; Variable +(variable_assignment + name: (word) @variable) + +(variable_reference + (word) @variable) + +(comment) @comment + +((word) @clean @string.regexp + (#match? @clean "[%\*\?]")) + +(function_call + function: "error" + (arguments (text) @error)) + +(function_call + function: "warning" + (arguments (text) @warning)) + +(function_call + function: "info" + (arguments (text) @info)) + +;; Install Command Categories +;; Others special variables +;; Variables Used by Implicit Rules +[ + "VPATH" + ".RECIPEPREFIX" +] @constant.builtin + +(variable_assignment + name: (word) @clean @constant.builtin + (#match? @clean "^(AR|AS|CC|CXX|CPP|FC|M2C|PC|CO|GET|LEX|YACC|LINT|MAKEINFO|TEX|TEXI2DVI|WEAVE|CWEAVE|TANGLE|CTANGLE|RM|ARFLAGS|ASFLAGS|CFLAGS|CXXFLAGS|COFLAGS|CPPFLAGS|FFLAGS|GFLAGS|LDFLAGS|LDLIBS|LFLAGS|YFLAGS|PFLAGS|RFLAGS|LINTFLAGS|PRE_INSTALL|POST_INSTALL|NORMAL_INSTALL|PRE_UNINSTALL|POST_UNINSTALL|NORMAL_UNINSTALL|MAKEFILE_LIST|MAKE_RESTARTS|MAKE_TERMOUT|MAKE_TERMERR|\.DEFAULT_GOAL|\.RECIPEPREFIX|\.EXTRA_PREREQS)$")) + +(variable_reference + (word) @clean @constant.builtin + (#match? @clean "^(AR|AS|CC|CXX|CPP|FC|M2C|PC|CO|GET|LEX|YACC|LINT|MAKEINFO|TEX|TEXI2DVI|WEAVE|CWEAVE|TANGLE|CTANGLE|RM|ARFLAGS|ASFLAGS|CFLAGS|CXXFLAGS|COFLAGS|CPPFLAGS|FFLAGS|GFLAGS|LDFLAGS|LDLIBS|LFLAGS|YFLAGS|PFLAGS|RFLAGS|LINTFLAGS|PRE_INSTALL|POST_INSTALL|NORMAL_INSTALL|PRE_UNINSTALL|POST_UNINSTALL|NORMAL_UNINSTALL|MAKEFILE_LIST|MAKE_RESTARTS|MAKE_TERMOUT|MAKE_TERMERR|\.DEFAULT_GOAL|\.RECIPEPREFIX|\.EXTRA_PREREQS\.VARIABLES|\.FEATURES|\.INCLUDE_DIRS|\.LOADED)$")) + +;; Standart targets +(targets + (word) @constant.macro + (#match? @constant.macro "^(all|install|install-html|install-dvi|install-pdf|install-ps|uninstall|install-strip|clean|distclean|mostlyclean|maintainer-clean|TAGS|info|dvi|html|pdf|ps|dist|check|installcheck|installdirs)$")) + +(targets + (word) @constant.macro + (#match? @constant.macro "^(all|install|install-html|install-dvi|install-pdf|install-ps|uninstall|install-strip|clean|distclean|mostlyclean|maintainer-clean|TAGS|info|dvi|html|pdf|ps|dist|check|installcheck|installdirs)$")) + +;; Builtin targets +(targets + (word) @constant.macro + (#match? @constant.macro "^\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX)$")) diff --git a/runtime/queries/make/injections.scm b/runtime/queries/make/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/make/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm new file mode 100644 index 00000000..f12254e9 --- /dev/null +++ b/runtime/queries/markdown/highlights.scm @@ -0,0 +1,41 @@ +[ + (atx_heading) + (setext_heading) +] @markup.heading + +(code_fence_content) @none + +[ + (indented_code_block) + (fenced_code_block) +] @markup.raw.block + +(block_quote) @markup.quote + +(code_span) @markup.raw.inline + +(emphasis) @markup.italic + +(strong_emphasis) @markup.bold + +(link_destination) @markup.link.url +(link_label) @markup.link.label + +[ + (link_text) + (image_description) +] @markup.link.text + +[ + (list_marker_plus) + (list_marker_minus) + (list_marker_star) + (list_marker_dot) + (list_marker_parenthesis) +] @punctuation.special + +[ + (backslash_escape) + (hard_line_break) +] @string.character.escape + diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm new file mode 100644 index 00000000..10dcab0b --- /dev/null +++ b/runtime/queries/markdown/injections.scm @@ -0,0 +1,9 @@ +(fenced_code_block + (info_string) @injection.language + (code_fence_content) @injection.content + (#set! injection.include-children)) + +((html_block) @injection.content + (#set! injection.language "html")) +((html_tag) @injection.content + (#set! injection.language "html")) diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm index 66719e87..f6682065 100644 --- a/runtime/queries/nix/highlights.scm +++ b/runtime/queries/nix/highlights.scm @@ -13,7 +13,7 @@ ] @keyword ((identifier) @variable.builtin - (#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins|false|null|true)$") + (#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$") (#is-not? local)) ((identifier) @function.builtin @@ -33,6 +33,11 @@ (uri) @string.special.uri +; boolean +((identifier) @constant.builtin.boolean (#match? @constant.builtin.boolean "^(true|false)$")) @constant.builtin.boolean +; null +((identifier) @constant.builtin (#eq? @constant.builtin "null")) @constant.builtin + (integer) @constant.numeric.integer (float) @constant.numeric.float diff --git a/runtime/queries/ocaml-interface/injections.scm b/runtime/queries/ocaml-interface/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/ocaml-interface/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/ocaml/highlights.scm b/runtime/queries/ocaml/highlights.scm index 15f46cc1..a08b1267 100644 --- a/runtime/queries/ocaml/highlights.scm +++ b/runtime/queries/ocaml/highlights.scm @@ -90,7 +90,7 @@ ["exception" "try"] @keyword.control.exception -["include" "open"] @include +["include" "open"] @keyword.control.import ["for" "to" "downto" "while" "do" "done"] @keyword.control.repeat diff --git a/runtime/queries/ocaml/indents.toml b/runtime/queries/ocaml/indents.toml index 9b6462d8..7586b83a 100644 --- a/runtime/queries/ocaml/indents.toml +++ b/runtime/queries/ocaml/indents.toml @@ -8,6 +8,6 @@ indent = [ "match_case", ] -oudent = [ +outdent = [ "}", ] diff --git a/runtime/queries/ocaml/injections.scm b/runtime/queries/ocaml/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/ocaml/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/perl/indents.toml b/runtime/queries/perl/indents.toml new file mode 100644 index 00000000..365e0663 --- /dev/null +++ b/runtime/queries/perl/indents.toml @@ -0,0 +1,17 @@ +indent = [ + "function", + "identifier", + "method_invocation", + "if_statement", + "unless_statement", + "if_simple_statement", + "unless_simple_statement", + "variable_declaration", + "block", + "list_item", + "word_list_qw" +] + +outdent = [ + "}" +] diff --git a/runtime/queries/perl/injections.scm b/runtime/queries/perl/injections.scm new file mode 100644 index 00000000..cab5f53d --- /dev/null +++ b/runtime/queries/perl/injections.scm @@ -0,0 +1,2 @@ +((comments) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/php/highlights.scm b/runtime/queries/php/highlights.scm index 46b5d26c..5379fa1e 100644 --- a/runtime/queries/php/highlights.scm +++ b/runtime/queries/php/highlights.scm @@ -5,7 +5,8 @@ (primitive_type) @type.builtin (cast_type) @type.builtin -(type_name (name) @type) +(named_type (name) @type) @type +(named_type (qualified_name) @type) @type ; Functions @@ -85,10 +86,12 @@ "endif" @keyword "endswitch" @keyword "endwhile" @keyword +"enum" @keyword "extends" @keyword "final" @keyword "finally" @keyword "foreach" @keyword +"fn" @keyword "function" @keyword "global" @keyword "if" @keyword @@ -97,6 +100,7 @@ "include" @keyword "insteadof" @keyword "interface" @keyword +"match" @keyword "namespace" @keyword "new" @keyword "private" @keyword diff --git a/runtime/queries/php/injections.scm b/runtime/queries/php/injections.scm index 16d5736b..614a3850 100644 --- a/runtime/queries/php/injections.scm +++ b/runtime/queries/php/injections.scm @@ -1,3 +1,6 @@ ((text) @injection.content (#set! injection.language "html") (#set! injection.combined)) + +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/php/textobjects.scm b/runtime/queries/php/textobjects.scm new file mode 100644 index 00000000..04ffefd2 --- /dev/null +++ b/runtime/queries/php/textobjects.scm @@ -0,0 +1,30 @@ +(class_declaration + body: (_) @class.inside) @class.around + +(interface_declaration + body: (_) @class.inside) @class.around + +(trait_declaration + body: (_) @class.inside) @class.around + +(enum_declaration + body: (_) @class.inside) @class.around + +(function_definition + body: (_) @function.inside) @function.around + +(method_declaration + body: (_) @function.inside) @function.around + +(arrow_function + body: (_) @function.inside) @function.around + +(anonymous_function_creation_expression + body: (_) @function.inside) @function.around + +(formal_parameters + [ + (simple_parameter) + (variadic_parameter) + (property_promotion_parameter) + ] @parameter.inside) diff --git a/runtime/queries/protobuf/injections.scm b/runtime/queries/protobuf/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/protobuf/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/python/injections.scm b/runtime/queries/python/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/python/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/regex/highlights.scm b/runtime/queries/regex/highlights.scm new file mode 100644 index 00000000..9376caa9 --- /dev/null +++ b/runtime/queries/regex/highlights.scm @@ -0,0 +1,53 @@ +; upstream: https://github.com/tree-sitter/tree-sitter-regex/blob/e1cfca3c79896ff79842f057ea13e529b66af636/queries/highlights.scm + +[ + "(" + ")" + "(?" + "(?:" + "(?<" + ">" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + "*" + "+" + "|" + "=" + "<=" + "!" + "<!" + "?" +] @operator + +[ + (identity_escape) + (control_letter_escape) + (character_class_escape) + (control_escape) + (start_assertion) + (end_assertion) + (boundary_assertion) + (non_boundary_assertion) +] @constant.character.escape + +(group_name) @property + +(count_quantifier + [ + (decimal_digits) @constant.numeric + "," @punctuation.delimiter + ]) + +(character_class + [ + "^" @operator + (class_range "-" @operator) + ]) + +(class_character) @constant.character +(pattern_character) @string diff --git a/runtime/queries/rescript/highlights.scm b/runtime/queries/rescript/highlights.scm new file mode 100644 index 00000000..b9ab8ea6 --- /dev/null +++ b/runtime/queries/rescript/highlights.scm @@ -0,0 +1,179 @@ +(comment) @comment + +; Identifiers +;------------ + +; Escaped identifiers like \"+." +((value_identifier) @function.macro + (#match? @function.macro "^\\.*$")) + +[ + (type_identifier) + (unit_type) + "list" +] @type + +[ + (variant_identifier) + (polyvar_identifier) +] @constant + +(property_identifier) @variable.other.member +(module_identifier) @namespace + +(jsx_identifier) @tag +(jsx_attribute (property_identifier) @variable.parameter) + +; Parameters +;---------------- + +(list_pattern (value_identifier) @variable.parameter) +(spread_pattern (value_identifier) @variable.parameter) + +; String literals +;---------------- + +[ + (string) + (template_string) +] @string + +(template_substitution + "${" @punctuation.bracket + "}" @punctuation.bracket) @embedded + +(character) @constant.character +(escape_sequence) @constant.character.escape + +; Other literals +;--------------- + +[ + (true) + (false) +] @constant.builtin + +(number) @constant.numeric +(polyvar) @constant +(polyvar_string) @constant + +; Functions +;---------- + +[ + (formal_parameters (value_identifier)) + (positional_parameter (value_identifier)) + (labeled_parameter (value_identifier)) +] @variable.parameter + +(function parameter: (value_identifier) @variable.parameter) + +; Meta +;----- + +[ + "@" + "@@" + (decorator_identifier) +] @label + +(extension_identifier) @keyword +("%") @keyword + +; Misc +;----- + +(subscript_expression index: (string) @variable.other.member) +(polyvar_type_pattern "#" @constant) + +[ + ("include") + ("open") +] @keyword + +[ + "as" + "export" + "external" + "let" + "module" + "mutable" + "private" + "rec" + "type" + "and" +] @keyword + +[ + "if" + "else" + "switch" +] @keyword + +[ + "exception" + "try" + "catch" + "raise" +] @keyword + +[ + "." + "," + "|" +] @punctuation.delimiter + +[ + "++" + "+" + "+." + "-" + "-." + "*" + "*." + "/" + "/." + "<" + "<=" + "==" + "===" + "!" + "!=" + "!==" + ">" + ">=" + "&&" + "||" + "=" + ":=" + "->" + "|>" + ":>" + (uncurry) +] @operator + +[ + "(" + ")" + "{" + "}" + "[" + "]" +] @punctuation.bracket + +(polyvar_type + [ + "[" + "[>" + "[<" + "]" + ] @punctuation.bracket) + +[ + "~" + "?" + "=>" + "..." +] @punctuation + +(ternary_expression ["?" ":"] @operator) diff --git a/runtime/queries/rescript/injections.scm b/runtime/queries/rescript/injections.scm new file mode 100644 index 00000000..201cce75 --- /dev/null +++ b/runtime/queries/rescript/injections.scm @@ -0,0 +1,8 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +((raw_js) @injection.content + (#set! injection.language "javascript")) + +((raw_gql) @injection.content + (#set! injection.language "graphql")) diff --git a/runtime/queries/rescript/textobjects.scm b/runtime/queries/rescript/textobjects.scm new file mode 100644 index 00000000..7ee8cd1a --- /dev/null +++ b/runtime/queries/rescript/textobjects.scm @@ -0,0 +1,9 @@ +; Classes (modules) +;------------------ + +(module_declaration definition: ((_) @class.inside)) @class.around + +; Functions +;---------- + +(function body: (_) @function.inside) @function.around diff --git a/runtime/queries/ruby/indents.toml b/runtime/queries/ruby/indents.toml new file mode 100644 index 00000000..b417751f --- /dev/null +++ b/runtime/queries/ruby/indents.toml @@ -0,0 +1,25 @@ +indent = [ + "argument_list", + "array", + "begin", + "block", + "call", + "class", + "case", + "do_block", + "elsif", + "if", + "hash", + "method", + "module", + "singleton_class", + "singleton_method", +] + +outdent = [ + ")", + "}", + "]", + "end", + "when", +] diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/ruby/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 539d9550..26496c66 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -127,11 +127,16 @@ "await" ] @keyword.control +"use" @keyword.control.import +(mod_item "mod" @keyword.control.import !body) +(use_as_clause "as" @keyword.control.import) + +(type_cast_expression "as" @keyword.operator) + [ (crate) (super) "as" - "use" "pub" "mod" "extern" @@ -242,10 +247,9 @@ ; --- ; Macros ; --- - (meta_item - (identifier) @attribute) -(attribute_item) @attribute + (identifier) @function.macro) + (inner_attribute_item) @attribute (macro_definition @@ -259,7 +263,7 @@ "!" @function.macro) (metavariable) @variable.parameter -(fragment_specifier) @variable.parameter +(fragment_specifier) @type diff --git a/runtime/queries/rust/indents.toml b/runtime/queries/rust/indents.toml index 3900f0b9..51a0ceea 100644 --- a/runtime/queries/rust/indents.toml +++ b/runtime/queries/rust/indents.toml @@ -9,6 +9,7 @@ indent = [ "field_initializer_list", "struct_pattern", "tuple_pattern", + "unit_expression", "enum_variant_list", "call_expression", "binary_expression", diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm index 6035d418..77c70805 100644 --- a/runtime/queries/rust/injections.scm +++ b/runtime/queries/rust/injections.scm @@ -1,3 +1,6 @@ +([(line_comment) (block_comment)] @injection.content + (#set! injection.language "comment")) + ((macro_invocation (token_tree) @injection.content) (#set! injection.language "rust") @@ -7,3 +10,17 @@ (token_tree) @injection.content) (#set! injection.language "rust") (#set! injection.include-children)) + +(call_expression + function: (scoped_identifier + path: (identifier) @_regex (#eq? @_regex "Regex") + name: (identifier) @_new (#eq? @_new "new")) + arguments: (arguments (raw_string_literal) @injection.content) + (#set! injection.language "regex")) + +(call_expression + function: (scoped_identifier + path: (scoped_identifier (identifier) @_regex (#eq? @_regex "Regex") .) + name: (identifier) @_new (#eq? @_new "new")) + arguments: (arguments (raw_string_literal) @injection.content) + (#set! injection.language "regex")) diff --git a/runtime/queries/scala/highlights.scm b/runtime/queries/scala/highlights.scm new file mode 100644 index 00000000..50a6e18a --- /dev/null +++ b/runtime/queries/scala/highlights.scm @@ -0,0 +1,203 @@ +; CREDITS @stumash (stuart.mashaal@gmail.com) + +;; variables + + +((identifier) @variable.builtin + (#match? @variable.builtin "^this$")) + +(interpolation) @none + +; Assume other uppercase names constants. +; NOTE: In order to distinguish constants we highlight +; all the identifiers that are uppercased. But this solution +; is not suitable for all occurrences e.g. it will highlight +; an uppercased method as a constant if used with no params. +; Introducing highlighting for those specific cases, is probably +; best way to resolve the issue. +((identifier) @constant (#match? @constant "^[A-Z]")) + +;; types + +(type_identifier) @type + +(class_definition + name: (identifier) @type) + +(object_definition + name: (identifier) @type) + +(trait_definition + name: (identifier) @type) + +(type_definition + name: (type_identifier) @type) + +; method definition + +(class_definition + body: (template_body + (function_definition + name: (identifier) @function.method))) +(object_definition + body: (template_body + (function_definition + name: (identifier) @function.method))) +(trait_definition + body: (template_body + (function_definition + name: (identifier) @function.method))) + +; imports + +(import_declaration + path: (identifier) @namespace) +((stable_identifier (identifier) @namespace)) + +((import_declaration + path: (identifier) @type) (#match? @type "^[A-Z]")) +((stable_identifier (identifier) @type) (#match? @type "^[A-Z]")) + +((import_selectors (identifier) @type) (#match? @type "^[A-Z]")) + +; method invocation + + +(call_expression + function: (identifier) @function) + +(call_expression + function: (field_expression + field: (identifier) @function.method)) + +((call_expression + function: (identifier) @variable.other.member) + (#match? @variable.other.member "^[A-Z]")) + +(generic_function + function: (identifier) @function) + +( + (identifier) @function.builtin + (#match? @function.builtin "^super$") +) + +; function definitions + +(function_definition + name: (identifier) @function) + +(parameter + name: (identifier) @variable.parameter) + +; expressions + + +(field_expression field: (identifier) @variable.other.member) +(field_expression value: (identifier) @type + (#match? @type "^[A-Z]")) + +(infix_expression operator: (identifier) @operator) +(infix_expression operator: (operator_identifier) @operator) +(infix_type operator: (operator_identifier) @operator) +(infix_type operator: (operator_identifier) @operator) + +; literals +(boolean_literal) @constant.builtin.boolean +(integer_literal) @constant.numeric.integer +(floating_point_literal) @constant.numeric.float + + +(symbol_literal) @string.special.symbol + +[ +(string) +(character_literal) +(interpolated_string_expression) +] @string + +(interpolation "$" @punctuation.special) + +;; keywords + +[ + "abstract" + "case" + "class" + "extends" + "final" + "finally" +;; `forSome` existential types not implemented yet + "implicit" + "lazy" +;; `macro` not implemented yet + "object" + "override" + "package" + "private" + "protected" + "sealed" + "trait" + "type" + "val" + "var" + "with" +] @keyword + +(null_literal) @constant.builtin +(wildcard) @keyword + +;; special keywords + +"new" @keyword.operator + +[ + "else" + "if" + "match" + "try" + "catch" + "throw" +] @keyword.control.conditional + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + "." + "," +] @punctuation.delimiter + +[ + "do" + "for" + "while" + "yield" +] @keyword.control.repeat + +"def" @keyword.function + +[ + "=>" + "<-" + "@" +] @keyword.operator + +"import" @keyword.control.import + +"return" @keyword.control.return + +(comment) @comment + +;; `case` is a conditional keyword in case_block + +(case_block + (case_clause ("case") @keyword.control.conditional)) + +(identifier) @variable
\ No newline at end of file diff --git a/runtime/queries/scala/indents.toml b/runtime/queries/scala/indents.toml new file mode 100644 index 00000000..6de54844 --- /dev/null +++ b/runtime/queries/scala/indents.toml @@ -0,0 +1,23 @@ + +indent = [ + "block", + "arguments", + "parameter", + "class_definition", + "trait_definition", + "object_definition", + "function_definition", + "val_definition", + "import_declaration", + "while_expression", + "do_while_expression", + "for_expression", + "try_expression", + "match_expression" +] + +outdent = [ + "}", + "]", + ")" +] diff --git a/runtime/queries/scala/injections.scm b/runtime/queries/scala/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/scala/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm index 4fcdfd66..22b0c551 100644 --- a/runtime/queries/svelte/highlights.scm +++ b/runtime/queries/svelte/highlights.scm @@ -20,12 +20,12 @@ ((element (start_tag (tag_name) @_tag) (text) @markup.inline) (#match? @_tag "^(code|kbd)$")) -((element (start_tag (tag_name) @_tag) (text) @markup.underline.link) +((element (start_tag (tag_name) @_tag) (text) @markup.link.url) (#eq? @_tag "a")) ((attribute (attribute_name) @_attr - (quoted_attribute_value (attribute_value) @markup.undeline.link)) + (quoted_attribute_value (attribute_value) @markup.link.url)) (#match? @_attr "^(href|src)$")) (tag_name) @tag diff --git a/runtime/queries/svelte/injections.scm b/runtime/queries/svelte/injections.scm index 266f4701..04e860cf 100644 --- a/runtime/queries/svelte/injections.scm +++ b/runtime/queries/svelte/injections.scm @@ -26,5 +26,5 @@ (#set! injection.language "typescript") ) -(comment) @comment - +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/tablegen/highlights.scm b/runtime/queries/tablegen/highlights.scm new file mode 100644 index 00000000..8ade5ba9 --- /dev/null +++ b/runtime/queries/tablegen/highlights.scm @@ -0,0 +1,90 @@ +[ + (comment) + (multiline_comment) +] @comment + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" +] @punctuation.bracket + +[ + "," + ";" + "." +] @punctuation.delimiter + +[ + "#" + "-" + "..." + ":" +] @operator + +[ + "=" + "!cond" + (operator_keyword) +] @function + +[ + "true" + "false" +] @constant.builtin.boolean + +[ + "?" +] @constant.builtin + +(var) @variable + +(template_arg (identifier) @variable.parameter) + +(_ argument: (value (identifier) @variable.parameter)) + +(type) @type + +"code" @type.builtin + +(number) @constant.numeric.integer +[ + (string_string) + (code_string) +] @string + +(preprocessor) @keyword.directive + +[ + "class" + "field" + "let" + "defvar" + "def" + "defset" + "defvar" + "assert" +] @keyword + +[ + "let" + "in" + "foreach" + "if" + "then" + "else" +] @keyword.operator + +"include" @keyword.control.import + +[ + "multiclass" + "defm" +] @namespace + +(ERROR) @error diff --git a/runtime/queries/tablegen/indents.toml b/runtime/queries/tablegen/indents.toml new file mode 100644 index 00000000..43532f4d --- /dev/null +++ b/runtime/queries/tablegen/indents.toml @@ -0,0 +1,7 @@ +indent = [ + "statement", +] + +outdent = [ + "}", +] diff --git a/runtime/queries/tablegen/injections.scm b/runtime/queries/tablegen/injections.scm new file mode 100644 index 00000000..0b476f86 --- /dev/null +++ b/runtime/queries/tablegen/injections.scm @@ -0,0 +1,2 @@ +([ (comment) (multiline_comment)] @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/tablegen/textobjects.scm b/runtime/queries/tablegen/textobjects.scm new file mode 100644 index 00000000..2cb80268 --- /dev/null +++ b/runtime/queries/tablegen/textobjects.scm @@ -0,0 +1,7 @@ +(class + body: (_) @class.inside) @class.around + +(multiclass + body: (_) @class.inside) @class.around + +(_ argument: _ @parameter.inside) diff --git a/runtime/queries/toml/injections.scm b/runtime/queries/toml/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/toml/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/tsq/injections.scm b/runtime/queries/tsq/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/tsq/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/tsx/injections.scm b/runtime/queries/tsx/injections.scm new file mode 100644 index 00000000..1b61e36d --- /dev/null +++ b/runtime/queries/tsx/injections.scm @@ -0,0 +1 @@ +; inherits: typescript diff --git a/runtime/queries/twig/highlights.scm b/runtime/queries/twig/highlights.scm new file mode 100644 index 00000000..2c95ab63 --- /dev/null +++ b/runtime/queries/twig/highlights.scm @@ -0,0 +1,16 @@ +(comment_directive) @comment + +[ + "{%" + "{%-" + "{%~" + "%}" + "-%}" + "~%}" + "{{" + "{{-" + "{{~" + "}}" + "-}}" + "~}}" +] @keyword diff --git a/runtime/queries/twig/injections.scm b/runtime/queries/twig/injections.scm new file mode 100644 index 00000000..f0822734 --- /dev/null +++ b/runtime/queries/twig/injections.scm @@ -0,0 +1,3 @@ +((content) @injection.content + (#set! injection.language "html") + (#set! injection.combined)) diff --git a/runtime/queries/typescript/injections.scm b/runtime/queries/typescript/injections.scm new file mode 100644 index 00000000..ff0ddfac --- /dev/null +++ b/runtime/queries/typescript/injections.scm @@ -0,0 +1 @@ +; inherits: javascript diff --git a/runtime/queries/vue/injections.scm b/runtime/queries/vue/injections.scm index 8ee34ffb..73df868b 100644 --- a/runtime/queries/vue/injections.scm +++ b/runtime/queries/vue/injections.scm @@ -15,3 +15,6 @@ ((style_element (raw_text) @injection.content) (#set! injection.language "css")) + +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/wgsl/injections.scm b/runtime/queries/wgsl/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/wgsl/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/yaml/highlights.scm b/runtime/queries/yaml/highlights.scm index a7efb5e7..e4fed27a 100644 --- a/runtime/queries/yaml/highlights.scm +++ b/runtime/queries/yaml/highlights.scm @@ -1,9 +1,19 @@ -(block_mapping_pair key: (_) @variable.other.member) -(flow_mapping (_ key: (_) @variable.other.member)) +(block_mapping_pair + key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)) +(block_mapping_pair + key: (flow_node (plain_scalar (string_scalar) @variable.other.member))) + +(flow_mapping + (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))) +(flow_mapping + (_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))) + (boolean_scalar) @constant.builtin.boolean (null_scalar) @constant.builtin (double_quote_scalar) @string (single_quote_scalar) @string +(block_scalar) @string +(string_scalar) @string (escape_sequence) @constant.character.escape (integer_scalar) @constant.numeric.integer (float_scalar) @constant.numeric.float @@ -30,4 +40,4 @@ "}" ] @punctuation.bracket -["*" "&"] @punctuation.special +["*" "&" "---" "..."] @punctuation.special diff --git a/runtime/queries/yaml/injections.scm b/runtime/queries/yaml/injections.scm new file mode 100644 index 00000000..321c90ad --- /dev/null +++ b/runtime/queries/yaml/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/zig/highlights.scm b/runtime/queries/zig/highlights.scm index 34dbeacd..62c99acc 100644 --- a/runtime/queries/zig/highlights.scm +++ b/runtime/queries/zig/highlights.scm @@ -144,7 +144,6 @@ field_constant: (IDENTIFIER) @constant ; VarDecl [ - "comptime" "threadlocal" "fn" ] @keyword.function @@ -178,6 +177,7 @@ field_constant: (IDENTIFIER) @constant ; PrecProc [ + "comptime" "inline" "noinline" "asm" @@ -195,15 +195,14 @@ field_constant: (IDENTIFIER) @constant (BitwiseOp) (BitShiftOp) (AdditionOp) + (AssignOp) (MultiplyOp) (PrefixOp) "*" "**" "->" - "=>" ".?" ".*" - "=" "?" ] @operator diff --git a/runtime/queries/zig/indents.toml b/runtime/queries/zig/indents.toml index 88f88e16..36ba8e55 100644 --- a/runtime/queries/zig/indents.toml +++ b/runtime/queries/zig/indents.toml @@ -3,6 +3,9 @@ indent = [ "BlockExpr", "ContainerDecl", "SwitchExpr", + "AssignExpr", + "ErrorUnionExpr", + "Statement", "InitList" ] diff --git a/runtime/queries/zig/injections.scm b/runtime/queries/zig/injections.scm new file mode 100644 index 00000000..3df95897 --- /dev/null +++ b/runtime/queries/zig/injections.scm @@ -0,0 +1,2 @@ +([(line_comment) (doc_comment)] @injection.content + (#set! injection.language "comment")) diff --git a/runtime/themes/base16_default_dark.toml b/runtime/themes/base16_default_dark.toml index d65995c0..d19863e0 100644 --- a/runtime/themes/base16_default_dark.toml +++ b/runtime/themes/base16_default_dark.toml @@ -1,27 +1,28 @@ -# Author: RayGervais<raygervais@hotmail.ca> +# Author: RayGervais <raygervais@hotmail.ca> "ui.background" = { bg = "base00" } "ui.menu" = "base01" -"ui.menu.selected" = { fg = "base04", bg = "base01" } -"ui.linenr" = {fg = "base01" } +"ui.menu.selected" = { fg = "base01", bg = "base04" } +"ui.linenr" = { fg = "base03", bg = "base01" } "ui.popup" = { bg = "base01" } "ui.window" = { bg = "base01" } -"ui.liner.selected" = "base02" -"ui.selection" = "base02" -"comment" = "base03" -"ui.statusline" = {fg = "base04", bg = "base01" } +"ui.linenr.selected" = { fg = "base04", bg = "base01", modifiers = ["bold"] } +"ui.selection" = { bg = "base02" } +"comment" = { fg = "base03", modifiers = ["italic"] } +"ui.statusline" = { fg = "base04", bg = "base01" } "ui.help" = { fg = "base04", bg = "base01" } -"ui.cursor" = { fg = "base05", modifiers = ["reversed"] } -"ui.text" = { fg = "base05" } +"ui.cursor" = { fg = "base04", modifiers = ["reversed"] } +"ui.cursor.primary" = { fg = "base05", modifiers = ["reversed"] } +"ui.text" = "base05" "operator" = "base05" -"ui.text.focus" = { fg = "base05" } +"ui.text.focus" = "base05" "variable" = "base08" "constant.numeric" = "base09" "constant" = "base09" -"attributes" = "base09" +"attributes" = "base09" "type" = "base0A" "ui.cursor.match" = { fg = "base0A", modifiers = ["underlined"] } -"strings" = "base0B" +"string" = "base0B" "variable.other.member" = "base0B" "constant.character.escape" = "base0C" "function" = "base0D" @@ -30,15 +31,28 @@ "keyword" = "base0E" "label" = "base0E" "namespace" = "base0E" -"ui.popup" = { bg = "base01" } -"ui.window" = { bg = "base00" } -"ui.help" = { bg = "base01", fg = "base06" } +"ui.help" = { fg = "base06", bg = "base01" } + +"markup.heading" = "base0D" +"markup.list" = "base08" +"markup.bold" = { fg = "base0A", modifiers = ["bold"] } +"markup.italic" = { fg = "base0E", modifiers = ["italic"] } +"markup.link.url" = { fg = "base09", modifiers = ["underlined"] } +"markup.link.text" = "base08" +"markup.quote" = "base0C" +"markup.raw" = "base0B" + +"diff.plus" = "base0B" +"diff.delta" = "base09" +"diff.minus" = "base08" -"info" = "base03" +"diagnostic" = { modifiers = ["underlined"] } +"ui.gutter" = { bg = "base01" } +"info" = "base0D" "hint" = "base03" "debug" = "base03" -"diagnostic" = "base03" -"error" = "base0E" +"warning" = "base09" +"error" = "base08" [palette] base00 = "#181818" # Default Background diff --git a/runtime/themes/base16_default_light.toml b/runtime/themes/base16_default_light.toml new file mode 100644 index 00000000..483e87cc --- /dev/null +++ b/runtime/themes/base16_default_light.toml @@ -0,0 +1,73 @@ +# Author: NNB <nnbnh@protonmail.com> + +"ui.background" = { bg = "base00" } +"ui.menu" = "base01" +"ui.menu.selected" = { fg = "base01", bg = "base04" } +"ui.linenr" = { fg = "base03", bg = "base01" } +"ui.popup" = { bg = "base01" } +"ui.window" = { bg = "base01" } +"ui.linenr.selected" = { fg = "base04", bg = "base01", modifiers = ["bold"] } +"ui.selection" = { bg = "base02" } +"comment" = { fg = "base03", modifiers = ["italic"] } +"ui.statusline" = { fg = "base04", bg = "base01" } +"ui.help" = { fg = "base04", bg = "base01" } +"ui.cursor" = { fg = "base04", modifiers = ["reversed"] } +"ui.cursor.primary" = { fg = "base05", modifiers = ["reversed"] } +"ui.text" = "base05" +"operator" = "base05" +"ui.text.focus" = "base05" +"variable" = "base08" +"constant.numeric" = "base09" +"constant" = "base09" +"attributes" = "base09" +"type" = "base0A" +"ui.cursor.match" = { fg = "base0A", modifiers = ["underlined"] } +"string" = "base0B" +"variable.other.member" = "base0B" +"constant.character.escape" = "base0C" +"function" = "base0D" +"constructor" = "base0D" +"special" = "base0D" +"keyword" = "base0E" +"label" = "base0E" +"namespace" = "base0E" +"ui.help" = { fg = "base06", bg = "base01" } + +"markup.heading" = "base0D" +"markup.list" = "base08" +"markup.bold" = { fg = "base0A", modifiers = ["bold"] } +"markup.italic" = { fg = "base0E", modifiers = ["italic"] } +"markup.link.url" = { fg = "base09", modifiers = ["underlined"] } +"markup.link.text" = "base08" +"markup.quote" = "base0C" +"markup.raw" = "base0B" + +"diff.plus" = "base0B" +"diff.delta" = "base09" +"diff.minus" = "base08" + +"diagnostic" = { modifiers = ["underlined"] } +"ui.gutter" = { bg = "base01" } +"info" = "base0D" +"hint" = "base03" +"debug" = "base03" +"warning" = "base09" +"error" = "base08" + +[palette] +base00 = "#f8f8f8" # Default Background +base01 = "#e8e8e8" # Lighter Background (Used for status bars, line number and folding marks) +base02 = "#d8d8d8" # Selection Background +base03 = "#b8b8b8" # Comments, Invisibles, Line Highlighting +base04 = "#585858" # Dark Foreground (Used for status bars) +base05 = "#383838" # Default Foreground, Caret, Delimiters, Operators +base06 = "#282828" # Light Foreground (Not often used) +base07 = "#181818" # Light Background (Not often used) +base08 = "#ab4642" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted +base09 = "#dc9656" # Integers, Boolean, Constants, XML Attributes, Markup Link Url +base0A = "#f7ca88" # Classes, Markup Bold, Search Text Background +base0B = "#a1b56c" # Strings, Inherited Class, Markup Code, Diff Inserted +base0C = "#86c1b9" # Support, Regular Expressions, Escape Characters, Markup Quotes +base0D = "#7cafc2" # Functions, Methods, Attribute IDs, Headings +base0E = "#ba8baf" # Keywords, Storage, Selector, Markup Italic, Diff Changed +base0F = "#a16946" # Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?> diff --git a/runtime/themes/base16_terminal.toml b/runtime/themes/base16_terminal.toml new file mode 100644 index 00000000..23240d8d --- /dev/null +++ b/runtime/themes/base16_terminal.toml @@ -0,0 +1,52 @@ +# Author: NNB <nnbnh@protonmail.com> + +"ui.menu" = "black" +"ui.menu.selected" = { modifiers = ["reversed"] } +"ui.linenr" = { fg = "light-gray", bg = "black" } +"ui.popup" = { bg = "black" } +"ui.window" = { bg = "black" } +"ui.linenr.selected" = { fg = "white", bg = "black", modifiers = ["bold"] } +"ui.selection" = { fg = "gray", modifiers = ["reversed"] } +"comment" = { fg = "light-gray", modifiers = ["italic"] } +"ui.statusline" = { fg = "white", bg = "black" } +"ui.statusline.inactive" = { fg = "gray", bg = "black" } +"ui.help" = { fg = "white", bg = "black" } +"ui.cursor" = { fg = "light-gray", modifiers = ["reversed"] } +"ui.cursor.primary" = { fg = "light-white", modifiers = ["reversed"] } +"variable" = "light-red" +"constant.numeric" = "yellow" +"constant" = "yellow" +"attributes" = "yellow" +"type" = "light-yellow" +"ui.cursor.match" = { fg = "light-yellow", modifiers = ["underlined"] } +"string" = "light-green" +"variable.other.member" = "light-green" +"constant.character.escape" = "light-cyan" +"function" = "light-blue" +"constructor" = "light-blue" +"special" = "light-blue" +"keyword" = "light-magenta" +"label" = "light-magenta" +"namespace" = "light-magenta" +"ui.help" = { fg = "white", bg = "black" } + +"markup.heading" = "light-blue" +"markup.list" = "light-red" +"markup.bold" = { fg = "light-yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "light-magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "light-red" +"markup.quote" = "light-cyan" +"markup.raw" = "light-green" + +"diff.plus" = "light-green" +"diff.delta" = "yellow" +"diff.minus" = "light-red" + +"diagnostic" = { modifiers = ["underlined"] } +"ui.gutter" = { bg = "black" } +"info" = "light-blue" +"hint" = "gray" +"debug" = "gray" +"warning" = "yellow" +"error" = "light-red" diff --git a/runtime/themes/bogster.toml b/runtime/themes/bogster.toml index 86a6c34b..32b58d0a 100644 --- a/runtime/themes/bogster.toml +++ b/runtime/themes/bogster.toml @@ -28,6 +28,20 @@ "module" = "#d32c5d" +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = "#59dcb7" +"diff.delta" = "#dc7759" +"diff.minus" = "#dc597f" + "ui.background" = { bg = "#161c23" } "ui.linenr" = { fg = "#415367" } "ui.linenr.selected" = { fg = "#e5ded6" } # TODO @@ -49,3 +63,6 @@ "error" = "#dc597f" "info" = "#59dcb7" "hint" = "#59c0dc" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } diff --git a/runtime/themes/dark_plus.toml b/runtime/themes/dark_plus.toml index 0554f827..ab7c16ec 100644 --- a/runtime/themes/dark_plus.toml +++ b/runtime/themes/dark_plus.toml @@ -39,6 +39,20 @@ "constant.numeric" = { fg = "pale_green" } "constant.character.escape" = { fg = "gold" } +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = { fg = "pale_green" } +"diff.delta" = { fg = "gold" } +"diff.minus" = { fg = "red" } + "ui.background" = { fg = "light_gray", bg = "dark_gray2" } "ui.window" = { bg = "widget" } diff --git a/runtime/themes/dracula.toml b/runtime/themes/dracula.toml new file mode 100644 index 00000000..1db25d8f --- /dev/null +++ b/runtime/themes/dracula.toml @@ -0,0 +1,63 @@ +# Author : Sebastian Zivota <loewenheim@mailbox.org> +"comment" = { fg = "comment" } +"constant" = { fg = "purple" } +"constant.character.escape" = { fg = "pink" } +"function" = { fg = "green" } +"keyword" = { fg = "pink" } +"operator" = { fg = "pink" } +"punctuation" = { fg = "foreground" } +"string" = { fg = "yellow" } +"string.regexp" = { fg = "red" } +"tag" = { fg = "pink" } +"type" = { fg = "cyan", modifiers = ["italic"] } +"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] } +"variable" = { fg = "foreground" } +"variable.builtin" = { fg = "cyan", modifiers = ["italic"] } +"variable.parameter" = { fg ="orange", modifiers = ["italic"] } + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + +"ui.background" = { fg = "foreground", bg = "background" } +"ui.cursor" = { fg = "background", bg = "orange", modifiers = ["dim"] } +"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] } +"ui.cursor.primary" = { fg = "background", bg = "cyan", modifier = ["dim"] } +"ui.help" = { fg = "foreground", bg = "background_dark" } +"ui.linenr" = { fg = "comment" } +"ui.linenr.selected" = { fg = "foreground" } +"ui.menu" = { fg = "foreground", bg = "background_dark" } +"ui.menu.selected" = { fg = "cyan", bg = "background_dark" } +"ui.popup" = { fg = "foreground", bg = "background_dark" } +"ui.selection" = { fg = "background", bg = "purple", modifiers = ["dim"] } +"ui.selection.primary" = { fg = "background", bg = "pink" } +"ui.statusline" = { fg = "foreground", bg = "background_dark" } +"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" } +"ui.text" = { fg = "foreground" } +"ui.text.focus" = { fg = "cyan" } +"ui.window" = { fg = "foreground" } + +"error" = { fg = "red" } +"warning" = { fg = "cyan" } + +"markup.heading" = { fg = "purple", modifiers = ["bold"] } +"markup.list" = "cyan" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "yellow", modifiers = ["italic"] } +"markup.link.url" = "cyan" +"markup.link.text" = "pink" +"markup.quote" = { fg = "yellow", modifiers = ["italic"] } +"markup.raw" = { fg = "foreground" } + +[palette] +background = "#282a36" +background_dark = "#21222c" +foreground = "#f8f8f2" +comment = "#6272a4" +red = "#ff5555" +orange = "#ffb86c" +yellow = "#f1fa8c" +green = "#50fa7b" +purple = "#bd93f9" +cyan = "#8be9fd" +pink = "#ff79c6" diff --git a/runtime/themes/everforest_dark.toml b/runtime/themes/everforest_dark.toml index bbd005e6..a6389da2 100644 --- a/runtime/themes/everforest_dark.toml +++ b/runtime/themes/everforest_dark.toml @@ -12,7 +12,7 @@ "type" = "yellow" "constant" = "purple" "constant.numeric" = "purple" -"string" = "grey2" +"string" = "green" "comment" = "grey0" "variable" = "fg" "variable.builtin" = "blue" @@ -34,6 +34,20 @@ "module" = "blue" "special" = "orange" +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + "ui.background" = { bg = "bg0" } "ui.cursor" = { fg = "bg0", bg = "fg" } "ui.cursor.match" = { fg = "orange", bg = "bg_yellow" } diff --git a/runtime/themes/everforest_light.toml b/runtime/themes/everforest_light.toml new file mode 100644 index 00000000..5490adb3 --- /dev/null +++ b/runtime/themes/everforest_light.toml @@ -0,0 +1,100 @@ +# Everforest (Dark Hard) +# Author: CptPotato + +# Original Author: +# URL: https://github.com/sainnhe/everforest +# Filename: autoload/everforest.vim +# Author: sainnhe +# Email: sainnhe@gmail.com +# License: MIT License + +"constant.character.escape" = "orange" +"type" = "yellow" +"constant" = "purple" +"constant.numeric" = "purple" +"string" = "green" +"comment" = "grey0" +"variable" = "fg" +"variable.builtin" = "blue" +"variable.parameter" = "fg" +"variable.other.member" = "fg" +"label" = "aqua" +"punctuation" = "grey2" +"punctuation.delimiter" = "grey2" +"punctuation.bracket" = "fg" +"keyword" = "red" +"operator" = "orange" +"function" = "green" +"function.builtin" = "blue" +"function.macro" = "aqua" +"tag" = "yellow" +"namespace" = "aqua" +"attribute" = "aqua" +"constructor" = "yellow" +"module" = "blue" +"special" = "orange" + +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +"ui.background" = { bg = "bg0" } +"ui.cursor" = { fg = "bg0", bg = "fg" } +"ui.cursor.match" = { fg = "orange", bg = "bg_yellow" } +"ui.cursor.insert" = { fg = "bg0", bg = "grey1" } +"ui.cursor.select" = { fg = "bg0", bg = "blue" } +"ui.linenr" = "grey0" +"ui.linenr.selected" = "fg" +"ui.statusline" = { fg = "grey2", bg = "bg2" } +"ui.statusline.inactive" = { fg = "grey0", bg = "bg1" } +"ui.popup" = { fg = "grey2", bg = "bg1" } +"ui.window" = { fg = "grey2", bg = "bg1" } +"ui.help" = { fg = "fg", bg = "bg1" } +"ui.text" = "fg" +"ui.text.focus" = "fg" +"ui.menu" = { fg = "fg", bg = "bg2" } +"ui.menu.selected" = { fg = "bg0", bg = "green" } +"ui.selection" = { bg = "bg3" } + +"hint" = "blue" +"info" = "aqua" +"warning" = "yellow" +"error" = "red" +"diagnostic" = { modifiers = ["underlined"] } + + +[palette] + +bg0 = "#fff9e8" +bg1 = "#f7f4e0" +bg2 = "#f0eed9" +bg3 = "#e9e8d2" +bg4 = "#e1ddcb" +bg5 = "#bec5b2" +bg_visual = "#edf0cd" +bg_red = "#fce5dc" +bg_green = "#f1f3d4" +bg_blue = "#eaf2eb" +bg_yellow = "#fbefd0" + +fg = "#5c6a72" +red = "#f85552" +orange = "#f57d26" +yellow = "#dfa000" +green = "#8da101" +aqua = "#35a77c" +blue = "#3a94c5" +purple = "#df69ba" +grey0 = "#a6b0a0" +grey1 = "#939f91" +grey2 = "#829181" diff --git a/runtime/themes/gruvbox.toml b/runtime/themes/gruvbox.toml index 0ff039ea..a976a9bd 100644 --- a/runtime/themes/gruvbox.toml +++ b/runtime/themes/gruvbox.toml @@ -19,6 +19,7 @@ "function" = { fg = "green1", modifiers = ["bold"] } "function.macro" = "aqua1" "function.builtin" = "yellow1" +"tag" = "red1" "comment" = { fg = "gray1", modifiers = ["italic"] } "constant" = { fg = "purple1" } "constant.builtin" = { fg = "purple1", modifiers = ["bold"] } @@ -28,6 +29,10 @@ "label" = "aqua1" "module" = "aqua1" +"diff.plus" = "green1" +"diff.delta" = "orange1" +"diff.minus" = "red1" + "warning" = { fg = "orange1", bg = "bg1" } "error" = { fg = "red1", bg = "bg1" } "info" = { fg = "aqua1", bg = "bg1" } @@ -51,6 +56,13 @@ "diagnostic" = { modifiers = ["underlined"] } +"markup.heading" = "aqua1" +"markup.bold" = { modifiers = ["bold"] } +"markup.italic" = { modifiers = ["italic"] } +"markup.link.url" = { fg = "green1", modifiers = ["underlined"] } +"markup.link.text" = "red1" +"markup.raw" = "red1" + [palette] bg0 = "#282828" # main background bg1 = "#3c3836" diff --git a/runtime/themes/gruvbox_light.toml b/runtime/themes/gruvbox_light.toml new file mode 100644 index 00000000..81ea7fd1 --- /dev/null +++ b/runtime/themes/gruvbox_light.toml @@ -0,0 +1,96 @@ +# Author : Rohan Jain <crodjer@pm.me> +# Author : Jakub Bartodziej <kubabartodziej@gmail.com> +# The theme uses the gruvbox light 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"] } +"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" = { fg = "orange1", bg = "bg1" } +"error" = { fg = "red1", bg = "bg1" } +"info" = { fg = "aqua1", bg = "bg1" } +"hint" = { fg = "blue1", bg = "bg1" } + +"ui.background" = { bg = "bg0" } +"ui.linenr" = { fg = "bg4" } +"ui.linenr.selected" = { fg = "yellow1" } +"ui.statusline" = { fg = "fg1", bg = "bg2" } +"ui.statusline.inactive" = { fg = "fg4", bg = "bg1" } +"ui.popup" = { bg = "bg1" } +"ui.window" = { bg = "bg1" } +"ui.help" = { bg = "bg1", fg = "fg1" } +"ui.text" = { fg = "fg1" } +"ui.text.focus" = { fg = "fg1" } +"ui.selection" = { bg = "bg3", modifiers = ["reversed"] } +"ui.cursor.primary" = { modifiers = ["reversed"] } +"ui.cursor.match" = { modifiers = ["reversed"] } +"ui.menu" = { fg = "fg1", bg = "bg2" } +"ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] } + +"diagnostic" = { modifiers = ["underlined"] } + +"markup.heading" = "aqua1" +"markup.bold" = { modifiers = ["bold"] } +"markup.italic" = { modifiers = ["italic"] } +"markup.link.url" = { fg = "green1", modifiers = ["underlined"] } +"markup.link.text" = "red1" +"markup.raw" = "red1" + +[palette] +bg0 = "#fbf1c7" # main background +bg1 = "#ebdbb2" +bg2 = "#d5c4a1" +bg3 = "#bdae93" +bg4 = "#a89984" + +fg0 = "#282828" # main foreground +fg1 = "#3c3836" +fg2 = "#504945" +fg3 = "#665c54" +fg4 = "#7c6f64" # gray0 + +gray0 = "#7c6f64" +gray1 = "#928374" + +red0 = "#cc241d" # neutral +red1 = "#9d0006" # bright +green0 = "#98971a" +green1 = "#79740e" +yellow0 = "#d79921" +yellow1 = "#b57614" +blue0 = "#458588" +blue1 = "#076678" +purple0 = "#b16286" +purple1 = "#8f3f71" +aqua0 = "#689d6a" +aqua1 = "#427b58" +orange0 = "#d65d0e" +orange1 = "#af3a03" diff --git a/runtime/themes/ingrid.toml b/runtime/themes/ingrid.toml index 30829475..a7c33e2d 100644 --- a/runtime/themes/ingrid.toml +++ b/runtime/themes/ingrid.toml @@ -28,6 +28,20 @@ "module" = "#839A53" +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = "#839A53" +"diff.delta" = "#D4A520" +"diff.minus" = "#D74E50" + "ui.background" = { bg = "#FFFCFD" } "ui.linenr" = { fg = "#bbbbbb" } "ui.linenr.selected" = { fg = "#F3EAE9" } # TODO diff --git a/runtime/themes/monokai.toml b/runtime/themes/monokai.toml index 38f9f170..e6ff0a5e 100644 --- a/runtime/themes/monokai.toml +++ b/runtime/themes/monokai.toml @@ -39,6 +39,20 @@ "constant.numeric" = { fg = "#ae81ff" } "constant.character.escape" = { fg = "#ae81ff" } +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = { fg = "#a6e22e" } +"diff.delta" = { fg = "#fd971f" } +"diff.minus" = { fg = "#f92672" } + "ui.background" = { fg = "text", bg = "background" } "ui.window" = { bg = "widget" } @@ -65,7 +79,7 @@ "warning" = { fg = "#cca700" } "error" = { fg = "#f48771" } "info" = { fg = "#75beff" } -"hint" = { fg = "#eeeeeeb3" } +"hint" = { fg = "#eeeeeb3" } diagnostic = { modifiers = ["underlined"] } diff --git a/runtime/themes/monokai_pro.toml b/runtime/themes/monokai_pro.toml new file mode 100644 index 00000000..8de9994c --- /dev/null +++ b/runtime/themes/monokai_pro.toml @@ -0,0 +1,115 @@ +# Author : WindSoilder<WindSoilder@outlook.com> +# The unofficial Monokai Pro theme, simply migrate from jetbrains monokai pro theme: https://github.com/subtheme-dev/monokai-pro +# Credit goes to the original creator: https://monokai.pro + +"ui.linenr.selected" = { bg = "base3" } +"ui.text.focus" = { fg = "yellow", modifiers= ["bold"] } +"ui.menu.selected" = { fg = "base2", bg = "yellow" } + +"info" = "base8" +"hint" = "base8" + +# background color +"ui.background" = { bg = "base2" } +"ui.statusline.inactive" = { fg = "base8", bg = "base8x0c" } + +# status bars, panels, modals, autocompletion +"ui.statusline" = { bg = "base4" } +"ui.popup" = { bg = "base3" } +"ui.window" = { bg = "base3" } +"ui.help" = { bg = "base3" } + +# active line, highlighting +"ui.selection" = { bg = "base4" } +"ui.cursor.match" = { bg = "base4" } + +# comments, nord3 based lighter color +"comment" = { fg = "base5", modifiers = ["italic"] } +"ui.linenr" = { fg = "base5" } + +# cursor, variables, constants, attributes, fields +"ui.cursor.primary" = { fg = "base7", modifiers = ["reversed"] } +"attribute" = "blue" +"variable" = "base8" +"constant" = "orange" +"variable.builtin" = "red" +"constant.builtin" = "red" +"namespace" = "base8" + +# base text, punctuation +"ui.text" = { fg = "base8" } +"punctuation" = "base6" + +# classes, types, primiatives +"type" = "green" +"type.builtin" = { fg = "red"} +"label" = "base8" + +# declaration, methods, routines +"constructor" = "blue" +"function" = "green" +"function.macro" = { fg = "blue" } +"function.builtin" = { fg = "cyan" } + +# operator, tags, units, punctuations +"operator" = "red" +"variable.other.member" = "base8" + +# keywords, special +"keyword" = { fg = "red" } +"keyword.directive" = "blue" +"variable.parameter" = "#f59762" + +# error +"error" = "red" + +# annotations, decorators +"special" = "#f59762" +"module" = "#f59762" + +# warnings, escape characters, regex +"warning" = "orange" +"constant.character.escape" = { fg = "base8" } + +# strings +"string" = "yellow" + +# integer, floating point +"constant.numeric" = "purple" + +# vcs +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } + +# markup highlight, no need for `markup.raw` and `markup.list`, make them to be default +"markup.heading" = "green" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.link.url" = { fg = "orange", modifiers = ["underlined"] } +"markup.link.text" = "yellow" +"markup.quote" = "green" + +[palette] +# primary colors +"red" = "#ff6188" +"orange" = "#fc9867" +"yellow" = "#ffd866" +"green" = "#a9dc76" +"blue" = "#78dce8" +"purple" = "#ab9df2" +# base colors, sorted from darkest to lightest +"base0" = "#19181a" +"base1" = "#221f22" +"base2" = "#2d2a2e" +"base3" = "#403e41" +"base4" = "#5b595c" +"base5" = "#727072" +"base6" = "#939293" +"base7" = "#c1c0c0" +"base8" = "#fcfcfa" +# variants (for when transparency isn't supported) +"base8x0c" = "#363337" # using base2 as bg diff --git a/runtime/themes/monokai_pro_machine.toml b/runtime/themes/monokai_pro_machine.toml new file mode 100644 index 00000000..c5890042 --- /dev/null +++ b/runtime/themes/monokai_pro_machine.toml @@ -0,0 +1,115 @@ +# Author : WindSoilder<WindSoilder@outlook.com> +# The unofficial Monokai Pro theme, simply migrate from jetbrains monokai pro theme: https://github.com/subtheme-dev/monokai-pro +# Credit goes to the original creator: https://monokai.pro + +"ui.linenr.selected" = { bg = "base3" } +"ui.text.focus" = { fg = "yellow", modifiers= ["bold"] } +"ui.menu.selected" = { fg = "base2", bg = "yellow" } + +"info" = "base8" +"hint" = "base8" + +# background color +"ui.background" = { bg = "base2" } +"ui.statusline.inactive" = { fg = "base8", bg = "base8x0c" } + +# status bars, panels, modals, autocompletion +"ui.statusline" = { bg = "base4" } +"ui.popup" = { bg = "base3" } +"ui.window" = { bg = "base3" } +"ui.help" = { bg = "base3" } + +# active line, highlighting +"ui.selection" = { bg = "base4" } +"ui.cursor.match" = { bg = "base4" } + +# comments, nord3 based lighter color +"comment" = { fg = "base5", modifiers = ["italic"] } +"ui.linenr" = { fg = "base5" } + +# cursor, variables, constants, attributes, fields +"ui.cursor.primary" = { fg = "base7", modifiers = ["reversed"] } +"attribute" = "blue" +"variable" = "base8" +"constant" = "orange" +"variable.builtin" = "red" +"constant.builtin" = "red" +"namespace" = "base8" + +# base text, punctuation +"ui.text" = { fg = "base8" } +"punctuation" = "base6" + +# classes, types, primiatives +"type" = "green" +"type.builtin" = { fg = "red"} +"label" = "base8" + +# declaration, methods, routines +"constructor" = "blue" +"function" = "green" +"function.macro" = { fg = "blue" } +"function.builtin" = { fg = "cyan" } + +# operator, tags, units, punctuations +"operator" = "red" +"variable.other.member" = "base8" + +# keywords, special +"keyword" = { fg = "red" } +"keyword.directive" = "blue" +"variable.parameter" = "#f59762" + +# error +"error" = "red" + +# annotations, decorators +"special" = "#f59762" +"module" = "#f59762" + +# warnings, escape characters, regex +"warning" = "orange" +"constant.character.escape" = { fg = "base8" } + +# strings +"string" = "yellow" + +# integer, floating point +"constant.numeric" = "purple" + +# vcs +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } + +# markup highlight, no need for `markup.raw` and `markup.list`, make them to be default +"markup.heading" = "green" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.link.url" = { fg = "orange", modifiers = ["underlined"] } +"markup.link.text" = "yellow" +"markup.quote" = "green" + +[palette] +# primary colors +"red" = "#ff6d7e" +"orange" = "#ffb270" +"yellow" = "#ffed72" +"green" = "#a2e57b" +"blue" = "#7cd5f1" +"purple" = "#baa0f8" +# base colors +"base0" = "#161b1e" +"base1" = "#1d2528" +"base2" = "#273136" +"base3" = "#3a4449" +"base4" = "#545f62" +"base5" = "#6b7678" +"base6" = "#798384" +"base7" = "#b8c4c3" +"base8" = "#f2fffc" +# variants +"base8x0c" = "#303a3e" diff --git a/runtime/themes/monokai_pro_octagon.toml b/runtime/themes/monokai_pro_octagon.toml new file mode 100644 index 00000000..d9badf3c --- /dev/null +++ b/runtime/themes/monokai_pro_octagon.toml @@ -0,0 +1,115 @@ +# Author : WindSoilder<WindSoilder@outlook.com> +# The unofficial Monokai Pro theme, simply migrate from jetbrains monokai pro theme: https://github.com/subtheme-dev/monokai-pro +# Credit goes to the original creator: https://monokai.pro + +"ui.linenr.selected" = { bg = "base3" } +"ui.text.focus" = { fg = "yellow", modifiers= ["bold"] } +"ui.menu.selected" = { fg = "base2", bg = "yellow" } + +"info" = "base8" +"hint" = "base8" + +# background color +"ui.background" = { bg = "base2" } +"ui.statusline.inactive" = { fg = "base8", bg = "base8x0c" } + +# status bars, panels, modals, autocompletion +"ui.statusline" = { bg = "base4" } +"ui.popup" = { bg = "base3" } +"ui.window" = { bg = "base3" } +"ui.help" = { bg = "base3" } + +# active line, highlighting +"ui.selection" = { bg = "base4" } +"ui.cursor.match" = { bg = "base4" } + +# comments, nord3 based lighter color +"comment" = { fg = "base5", modifiers = ["italic"] } +"ui.linenr" = { fg = "base5" } + +# cursor, variables, constants, attributes, fields +"ui.cursor.primary" = { fg = "base7", modifiers = ["reversed"] } +"attribute" = "blue" +"variable" = "base8" +"constant" = "orange" +"variable.builtin" = "red" +"constant.builtin" = "red" +"namespace" = "base8" + +# base text, punctuation +"ui.text" = { fg = "base8" } +"punctuation" = "base6" + +# classes, types, primiatives +"type" = "green" +"type.builtin" = { fg = "red"} +"label" = "base8" + +# declaration, methods, routines +"constructor" = "blue" +"function" = "green" +"function.macro" = { fg = "blue" } +"function.builtin" = { fg = "cyan" } + +# operator, tags, units, punctuations +"operator" = "red" +"variable.other.member" = "base8" + +# keywords, special +"keyword" = { fg = "red" } +"keyword.directive" = "blue" +"variable.parameter" = "#f59762" + +# error +"error" = "red" + +# annotations, decorators +"special" = "#f59762" +"module" = "#f59762" + +# warnings, escape characters, regex +"warning" = "orange" +"constant.character.escape" = { fg = "base8" } + +# strings +"string" = "yellow" + +# integer, floating point +"constant.numeric" = "purple" + +# vcs +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } + +# markup highlight, no need for `markup.raw` and `markup.list`, make them to be default +"markup.heading" = "green" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.link.url" = { fg = "orange", modifiers = ["underlined"] } +"markup.link.text" = "yellow" +"markup.quote" = "green" + +[palette] +# primary colors +"red" = "#ff657a" +"orange" = "#ff9b5e" +"yellow" = "#ffd76d" +"green" = "#bad761" +"blue" = "#9cd1bb" +"purple" = "#c39ac9" +# base colors +"base0" = "#161821" +"base1" = "#1e1f2b" +"base2" = "#282a3a" +"base3" = "#3a3d4b" +"base4" = "#535763" +"base5" = "#696d77" +"base6" = "#767b81" +"base7" = "#b2b9bd" +"base8" = "#eaf2f1" +# variants +"base8x0c" = "#303342" diff --git a/runtime/themes/monokai_pro_ristretto.toml b/runtime/themes/monokai_pro_ristretto.toml new file mode 100644 index 00000000..ed7ebeae --- /dev/null +++ b/runtime/themes/monokai_pro_ristretto.toml @@ -0,0 +1,115 @@ +# Author : WindSoilder<WindSoilder@outlook.com> +# The unofficial Monokai Pro theme, simply migrate from jetbrains monokai pro theme: https://github.com/subtheme-dev/monokai-pro +# Credit goes to the original creator: https://monokai.pro + +"ui.linenr.selected" = { bg = "base3" } +"ui.text.focus" = { fg = "yellow", modifiers= ["bold"] } +"ui.menu.selected" = { fg = "base2", bg = "yellow" } + +"info" = "base8" +"hint" = "base8" + +# background color +"ui.background" = { bg = "base2" } +"ui.statusline.inactive" = { fg = "base8", bg = "base8x0c" } + +# status bars, panels, modals, autocompletion +"ui.statusline" = { bg = "base4" } +"ui.popup" = { bg = "base3" } +"ui.window" = { bg = "base3" } +"ui.help" = { bg = "base3" } + +# active line, highlighting +"ui.selection" = { bg = "base4" } +"ui.cursor.match" = { bg = "base4" } + +# comments, nord3 based lighter color +"comment" = { fg = "base5", modifiers = ["italic"] } +"ui.linenr" = { fg = "base5" } + +# cursor, variables, constants, attributes, fields +"ui.cursor.primary" = { fg = "base7", modifiers = ["reversed"] } +"attribute" = "blue" +"variable" = "base8" +"constant" = "orange" +"variable.builtin" = "red" +"constant.builtin" = "red" +"namespace" = "base8" + +# base text, punctuation +"ui.text" = { fg = "base8" } +"punctuation" = "base6" + +# classes, types, primiatives +"type" = "green" +"type.builtin" = { fg = "red"} +"label" = "base8" + +# declaration, methods, routines +"constructor" = "blue" +"function" = "green" +"function.macro" = { fg = "blue" } +"function.builtin" = { fg = "cyan" } + +# operator, tags, units, punctuations +"operator" = "red" +"variable.other.member" = "base8" + +# keywords, special +"keyword" = { fg = "red" } +"keyword.directive" = "blue" +"variable.parameter" = "#f59762" + +# error +"error" = "red" + +# annotations, decorators +"special" = "#f59762" +"module" = "#f59762" + +# warnings, escape characters, regex +"warning" = "orange" +"constant.character.escape" = { fg = "base8" } + +# strings +"string" = "yellow" + +# integer, floating point +"constant.numeric" = "purple" + +# vcs +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } + +# markup highlight, no need for `markup.raw` and `markup.list`, make them to be default +"markup.heading" = "green" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.link.url" = { fg = "orange", modifiers = ["underlined"] } +"markup.link.text" = "yellow" +"markup.quote" = "green" + +[palette] +# primary colors +"red" = "#fd6883" +"orange" = "#f38d70" +"yellow" = "#f9cc6c" +"green" = "#adda78" +"blue" = "#85dacc" +"purple" = "#a8a9eb" +# base colors +"base0" = "#191515" +"base1" = "#211c1c" +"base2" = "#2c2525" +"base3" = "#403838" +"base4" = "#5b5353" +"base5" = "#72696a" +"base6" = "#8c8384" +"base7" = "#c3b7b8" +"base8" = "#fff1f3" +# variants +"base8x0c" = "#352e2e" diff --git a/runtime/themes/monokai_pro_spectrum.toml b/runtime/themes/monokai_pro_spectrum.toml new file mode 100644 index 00000000..da06e597 --- /dev/null +++ b/runtime/themes/monokai_pro_spectrum.toml @@ -0,0 +1,115 @@ +# Author : WindSoilder<WindSoilder@outlook.com> +# The unofficial Monokai Pro theme, simply migrate from jetbrains monokai pro theme: https://github.com/subtheme-dev/monokai-pro +# Credit goes to the original creator: https://monokai.pro + +"ui.linenr.selected" = { bg = "base3" } +"ui.text.focus" = { fg = "yellow", modifiers= ["bold"] } +"ui.menu.selected" = { fg = "base2", bg = "yellow" } + +"info" = "base8" +"hint" = "base8" + +# background color +"ui.background" = { bg = "base2" } +"ui.statusline.inactive" = { fg = "base8", bg = "base8x0c" } + +# status bars, panels, modals, autocompletion +"ui.statusline" = { bg = "base4" } +"ui.popup" = { bg = "base3" } +"ui.window" = { bg = "base3" } +"ui.help" = { bg = "base3" } + +# active line, highlighting +"ui.selection" = { bg = "base4" } +"ui.cursor.match" = { bg = "base4" } + +# comments, nord3 based lighter color +"comment" = { fg = "base5", modifiers = ["italic"] } +"ui.linenr" = { fg = "base5" } + +# cursor, variables, constants, attributes, fields +"ui.cursor.primary" = { fg = "base7", modifiers = ["reversed"] } +"attribute" = "blue" +"variable" = "base8" +"constant" = "orange" +"variable.builtin" = "red" +"constant.builtin" = "red" +"namespace" = "base8" + +# base text, punctuation +"ui.text" = { fg = "base8" } +"punctuation" = "base6" + +# classes, types, primiatives +"type" = "green" +"type.builtin" = { fg = "red"} +"label" = "base8" + +# declaration, methods, routines +"constructor" = "blue" +"function" = "green" +"function.macro" = { fg = "blue" } +"function.builtin" = { fg = "cyan" } + +# operator, tags, units, punctuations +"operator" = "red" +"variable.other.member" = "base8" + +# keywords, special +"keyword" = { fg = "red" } +"keyword.directive" = "blue" +"variable.parameter" = "#f59762" + +# error +"error" = "red" + +# annotations, decorators +"special" = "#f59762" +"module" = "#f59762" + +# warnings, escape characters, regex +"warning" = "orange" +"constant.character.escape" = { fg = "base8" } + +# strings +"string" = "yellow" + +# integer, floating point +"constant.numeric" = "purple" + +# vcs +"diff.plus" = "green" +"diff.delta" = "orange" +"diff.minus" = "red" + +# make diagnostic underlined, to distinguish with selection text. +diagnostic = { modifiers = ["underlined"] } + +# markup highlight, no need for `markup.raw` and `markup.list`, make them to be default +"markup.heading" = "green" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.link.url" = { fg = "orange", modifiers = ["underlined"] } +"markup.link.text" = "yellow" +"markup.quote" = "green" + +[palette] +# primary colors +"red" = "#fc618d" +"orange" = "#fd9353" +"yellow" = "#fce566" +"green" = "#7bd88f" +"blue" = "#5ad4e6" +"purple" = "#948ae3" +# base colors +"base0" = "#131313" +"base1" = "#191919" +"base2" = "#222222" +"base3" = "#363537" +"base4" = "#525053" +"base5" = "#69676c" +"base6" = "#8b888f" +"base7" = "#bab6c0" +"base8" = "#f7f1ff" +# variants +"base8x0c" = "#2b2b2b" diff --git a/runtime/themes/nord.toml b/runtime/themes/nord.toml index a619f902..deb90452 100644 --- a/runtime/themes/nord.toml +++ b/runtime/themes/nord.toml @@ -84,6 +84,21 @@ # nord15 - integer, floating point "constant.numeric" = "nord15" +# TODO markup +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +# vcs +"diff.plus" = "nord14" +"diff.delta" = "nord12" +"diff.minus" = "nord11" + [palette] nord0 = "#2e3440" nord1 = "#3b4252" diff --git a/runtime/themes/onedark.toml b/runtime/themes/onedark.toml index 40ed1abe..acdaf99c 100644 --- a/runtime/themes/onedark.toml +++ b/runtime/themes/onedark.toml @@ -3,27 +3,42 @@ "attribute" = { fg = "yellow" } "comment" = { fg = "light-gray", modifiers = ["italic"] } "constant" = { fg = "cyan" } -"constant.builtin" = { fg = "blue" } +"constant.numeric" = { fg = "gold" } +"constant.builtin" = { fg = "gold" } +"constant.character.escape" = { fg = "gold" } "constructor" = { fg = "blue" } -"escape" = { fg = "gold" } "function" = { fg = "blue" } "function.builtin" = { fg = "blue" } "function.macro" = { fg = "purple" } "keyword" = { fg = "red" } "keyword.control" = { fg = "purple" } +"keyword.control.import" = { fg = "red" } "keyword.directive" = { fg = "purple" } "label" = { fg = "purple" } "namespace" = { fg = "blue" } -"number" = { fg = "gold" } "operator" = { fg = "purple" } +"keyword.operator" = { fg = "purple" } "property" = { fg = "red" } "special" = { fg = "blue" } "string" = { fg = "green" } "type" = { fg = "yellow" } -"type.builtin" = { fg = "yellow" } # "variable" = { fg = "blue" } "variable.builtin" = { fg = "blue" } "variable.parameter" = { fg = "red" } +"variable.other.member" = { fg = "red" } + +"markup.heading" = { fg = "red" } +"markup.raw.inline" = { fg = "green" } +"markup.bold" = { fg = "gold", modifiers = ["bold"] } +"markup.italic" = { fg = "purple", modifiers = ["italic"] } +"markup.list" = { fg = "red" } +"markup.quote" = { fg = "yellow" } +"markup.link.url" = { fg = "cyan", modifiers = ["underlined"]} +"markup.link.text" = { fg = "purple" } + +"diff.plus" = "green" +"diff.delta" = "gold" +"diff.minus" = "red" diagnostic = { modifiers = ["underlined"] } "info" = { fg = "blue", modifiers = ["bold"] } diff --git a/runtime/themes/rose_pine.toml b/runtime/themes/rose_pine.toml index 53777008..66717bb2 100644 --- a/runtime/themes/rose_pine.toml +++ b/runtime/themes/rose_pine.toml @@ -1,15 +1,15 @@ # Author: RayGervais<raygervais@hotmail.ca> +# Author: ChrisHa<chunghha@users.noreply.github.com> "ui.background" = { bg = "base" } -"ui.menu" = "surface" +"ui.menu" = { fg = "text", bg = "overlay" } "ui.menu.selected" = { fg = "iris", bg = "surface" } "ui.linenr" = {fg = "subtle" } -"ui.popup" = { bg = "overlay" } -"ui.window" = { bg = "overlay" } "ui.liner.selected" = "highlightOverlay" "ui.selection" = "highlight" "comment" = "subtle" "ui.statusline" = {fg = "foam", bg = "surface" } +"ui.statusline.inactive" = { fg = "iris", bg = "surface" } "ui.help" = { fg = "foam", bg = "surface" } "ui.cursor" = { fg = "rose", modifiers = ["reversed"] } "ui.text" = { fg = "text" } @@ -32,10 +32,13 @@ "keyword" = "pine" "label" = "iris" "namespace" = "pine" -"ui.popup" = { bg = "overlay" } +"ui.popup" = { bg = "surface" } "ui.window" = { bg = "base" } "ui.help" = { bg = "overlay", fg = "foam" } "text" = "text" +"diff.plus" = "foam" +"diff.delta" = "rose" +"diff.minus" = "love" "info" = "gold" "hint" = "gold" @@ -43,6 +46,15 @@ "diagnostic" = "rose" "error" = "love" +"markup.heading" = { fg = "rose" } +"markup.raw.inline" = { fg = "foam" } +"markup.bold" = { fg = "gold", modifiers = ["bold"] } +"markup.italic" = { fg = "iris", modifiers = ["italic"] } +"markup.list" = { fg = "love" } +"markup.quote" = { fg = "rose" } +"markup.link.url" = { fg = "pine", modifiers = ["underlined"]} +"markup.link.text" = { fg = "foam" } + [palette] base = "#191724" surface = "#1f1d2e" diff --git a/runtime/themes/rose_pine_dawn.toml b/runtime/themes/rose_pine_dawn.toml new file mode 100644 index 00000000..bec77506 --- /dev/null +++ b/runtime/themes/rose_pine_dawn.toml @@ -0,0 +1,73 @@ +# Author: RayGervais<raygervais@hotmail.ca> +# Author: ChrisHa<chunghha@users.noreply.github.com> + +"ui.background" = { bg = "surface" } +"ui.menu" = { fg = "text", bg = "overlay" } +"ui.menu.selected" = { fg = "iris", bg = "surface" } +"ui.linenr" = {fg = "subtle" } +"ui.liner.selected" = "highlightOverlay" +"ui.selection" = "highlight" +"comment" = "subtle" +"ui.statusline" = {fg = "foam", bg = "surface" } +"ui.statusline.inactive" = { fg = "iris", bg = "surface" } +"ui.help" = { fg = "foam", bg = "surface" } +"ui.cursor" = { fg = "rose", modifiers = ["reversed"] } +"ui.text" = { fg = "text" } +"operator" = "rose" +"ui.text.focus" = { fg = "base05" } +"variable" = "text" +"number" = "iris" +"constant" = "gold" +"attributes" = "gold" +"type" = "foam" +"ui.cursor.match" = { fg = "gold", modifiers = ["underlined"] } +"string" = "gold" +"property" = "foam" +"escape" = "subtle" +"function" = "rose" +"function.builtin" = "rose" +"function.method" = "foam" +"constructor" = "gold" +"special" = "gold" +"keyword" = "pine" +"label" = "iris" +"namespace" = "pine" +"ui.popup" = { bg = "surface" } +"ui.window" = { bg = "base" } +"ui.help" = { bg = "overlay", fg = "foam" } +"text" = "text" +"diff.plus" = "foam" +"diff.delta" = "rose" +"diff.minus" = "love" + +"info" = "gold" +"hint" = "gold" +"debug" = "rose" +"diagnostic" = "rose" +"error" = "love" + +"markup.heading" = { fg = "rose" } +"markup.raw.inline" = { fg = "foam" } +"markup.bold" = { fg = "gold", modifiers = ["bold"] } +"markup.italic" = { fg = "iris", modifiers = ["italic"] } +"markup.list" = { fg = "love" } +"markup.quote" = { fg = "rose" } +"markup.link.url" = { fg = "pine", modifiers = ["underlined"]} +"markup.link.test" = { fg = "foam" } + +[palette] +base = "#faf4ed" +surface = "#fffaf3" +overlay = "#f2e9de" +inactive = "#9893a5" +subtle = "#6e6a86" +text = "#575279" +love = "#b4637a" +gold = "#ea9d34" +rose = "#d7827e" +pine = "#286983" +foam = "#56949f" +iris = "#907aa9" +highlight = "#eee9e6" +highlightInactive = "#f2ede9" +highlightOverlay = "#e4dfde" diff --git a/runtime/themes/serika-dark.toml b/runtime/themes/serika-dark.toml new file mode 100644 index 00000000..da145780 --- /dev/null +++ b/runtime/themes/serika-dark.toml @@ -0,0 +1,99 @@ +# Serika (Dark) +# Author: VuiMuich + +# Original Author: +# URL: https://github.com/arturoalviar/serika-syntax +# Author: arturoalviar +# License: MIT License + +"escape" = "orange" +"type" = "yellow" +"constant" = "purple" +"number" = "purple" +"string" = "fg" +"comment" = "grey2" +"variable" = "yellow" +"variable.builtin" = "blue" +"variable.parameter" = "yellow" +"variable.property" = "yellow" +"label" = "aqua" +"punctuation" = "grey0" +"punctuation.delimiter" = "grey2" +"punctuation.bracket" = "fg" +"keyword" = "red" +"operator" = "grey0" +"function" = "green" +"function.builtin" = "blue" +"function.macro" = "aqua" +"tag" = "yellow" +"namespace" = "fg" +"attribute" = "aqua" +"constructor" = "yellow" +"module" = "blue" +"property" = "yellow" +"special" = "orange" + +"ui.background" = { bg = "bg0" } +"ui.cursor" = { fg = "bg0", bg = "fg" } +"ui.cursor.match" = { fg = "grey3", bg = "grey2" } +"ui.cursor.insert" = { fg = "bg0", bg = "bg_yellow" } +"ui.cursor.select" = { fg = "bg0", bg = "bg_yellow" } +"ui.linenr" = "yellow" +"ui.linenr.selected" = { fg = "fg", modifiers = ["bold", "underlined"] } +"ui.statusline" = { fg = "grey1", bg = "bg2" } +"ui.statusline.inactive" = { fg = "grey2", bg = "bg1" } +"ui.popup" = { fg = "grey2", bg = "bg1" } +"ui.window" = { fg = "grey2", bg = "bg1" } +"ui.help" = { fg = "fg", bg = "bg1" } +"ui.text" = "fg" +"ui.text.focus" = "yellow" +"ui.menu" = { fg = "fg", bg = "bg2" } +"ui.menu.selected" = { fg = "bg0", bg = "bg_yellow" } +"ui.selection" = { bg = "bg3" } + +"hint" = "blue" +"info" = "aqua" +"warning" = "yellow" +"error" = "nasty-red" +"diagnostic" = { fg = "dark-red", Modifiers = ["underlined"] } + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + +"markup.heading" = { fg = "purple", modifiers = ["bold"] } +"markup.list" = "cyan" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "yellow", modifiers = ["italic"] } +"markup.link.url" = "cyan" +"markup.link.text" = "pink" +"markup.quote" = { fg = "yellow", modifiers = ["italic"] } +"markup.raw" = { fg = "foreground" } + +[palette] + +bg0 = "#323437" +bg1 = "#494c50" +bg2 = "#55585e" +bg3 = "#61656b" +bg4 = "#6d7278" +bg5 = "#797e86" +bg_visual = "#646669" +bg_red = "#7e2a33" +bg_green = "#86b365" +bg_blue = "#6a89af" +bg_yellow = "#e2b714" + +fg = "#d1d0c5" +red = "#f9ebed" +nasty-red = "#ca4754" +dark-red = "#7e2a33" +orange = "#dd8a3c" +yellow = "#e2b714" +green = "#e5eae1" +aqua = "#b9c2c6" +blue = "#bdcadb" +purple = "#d0c4d4" +grey0 = "#aaaeb3" +grey1 = "#e1e1e3" +grey2 = "#646669" diff --git a/runtime/themes/serika-light.toml b/runtime/themes/serika-light.toml new file mode 100644 index 00000000..edde9044 --- /dev/null +++ b/runtime/themes/serika-light.toml @@ -0,0 +1,100 @@ +# Serika (Light) +# Author: VuiMuich + +# Original Author: +# URL: https://github.com/arturoalviar/serika-syntax +# Author: arturoalviar +# License: MIT License + +"escape" = "orange" +"type" = "yellow" +"constant" = "purple" +"number" = "purple" +"string" = "fg" +"comment" = "grey2" +"variable" = "yellow" +"variable.builtin" = "blue" +"variable.parameter" = "yellow" +"variable.property" = "yellow" +"label" = "aqua" +"punctuation" = "grey0" +"punctuation.delimiter" = "grey2" +"punctuation.bracket" = "fg" +"keyword" = "red" +"operator" = "grey0" +"function" = "green" +"function.builtin" = "blue" +"function.macro" = "aqua" +"tag" = "yellow" +"namespace" = "fg" +"attribute" = "aqua" +"constructor" = "yellow" +"module" = "blue" +"property" = "yellow" +"special" = "orange" + +"ui.background" = { bg = "bg0" } +"ui.cursor" = { fg = "bg0", bg = "fg" } +"ui.cursor.match" = { fg = "grey1", bg = "grey2" } +"ui.cursor.insert" = { fg = "bg0", bg = "bg_yellow" } +"ui.cursor.select" = { fg = "bg0", bg = "bg_yellow" } +"ui.linenr" = "yellow" +"ui.linenr.selected" = { fg = "fg", modifiers = ["bold", "underlined"] } +"ui.statusline" = { fg = "grey1", bg = "bg5" } +"ui.statusline.inactive" = { fg = "grey2", bg = "bg1" } +"ui.popup" = { fg = "bg0", bg = "bg5" } +"ui.window" = { fg = "bg0", bg = "bg5" } +"ui.help" = { fg = "bg0", bg = "bg5" } +"ui.text" = "fg" +"ui.text.focus" = "yellow" +"ui.menu" = { fg = "bg0", bg = "bg3" } +"ui.menu.selected" = { fg = "bg0", bg = "bg_yellow" } +"ui.selection" = { fg = "bg0", bg = "bg3" } + +"hint" = "blue" +"info" = "aqua" +"warning" = "yellow" +"error" = "nasty-red" +"diagnostic" = { fg = "dark-red", Modifiers = ["underlined"] } + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + +"markup.heading" = { fg = "purple", modifiers = ["bold"] } +"markup.list" = "cyan" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "yellow", modifiers = ["italic"] } +"markup.link.url" = "cyan" +"markup.link.text" = "pink" +"markup.quote" = { fg = "yellow", modifiers = ["italic"] } +"markup.raw" = { fg = "foreground" } + + +[palette] + +bg0 = "#e1e1e3" +bg1 = "#494c50" +bg2 = "#55585e" +bg3 = "#61656b" +bg4 = "#6d7278" +bg5 = "#797e86" +bg_visual = "#646669" +bg_red = "#7e2a33" +bg_green = "#86b365" +bg_blue = "#6a89af" +bg_yellow = "#e2b714" + +fg = "#323437" +red = "#621d28" +nasty-red = "#da3333" +dark-red = "#791717" +orange = "#57320f" +yellow = "#e2b714" +green = "#3f4b34" +aqua = "#455054" +blue = "#3f5673" +purple = "#534059" +grey0 = "#aaaeb3" +grey1 = "#e1e1e3" +grey2 = "#646669" diff --git a/runtime/themes/solarized_dark.toml b/runtime/themes/solarized_dark.toml index 984c86ee..dfaa104a 100644 --- a/runtime/themes/solarized_dark.toml +++ b/runtime/themes/solarized_dark.toml @@ -22,6 +22,20 @@ "module" = { fg = "violet" } "tag" = { fg = "magenta" } +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + # 背景 "ui.background" = { bg = "base03" } @@ -58,13 +72,13 @@ "ui.highlight" = { fg = "red", modifiers = ["bold", "italic", "underlined"] } # 主光标/selectio -"ui.cursor.primary" = {fg = "base03", bg = "base1"} -"ui.selection.primary" = { fg = "base03", bg = "base01" } -"ui.cursor.select" = {fg = "base02", bg = "green"} -"ui.selection" = { fg = "base02", bg = "yellow" } +"ui.cursor.primary" = { fg = "base03", bg = "base1" } +"ui.cursor.select" = { fg = "base02", bg = "cyan" } +"ui.selection" = { bg = "base0175" } +"ui.selection.primary" = { bg = "base015" } # normal模式的光标 -"ui.cursor" = {fg = "base03", bg = "green"} +"ui.cursor" = {fg = "base02", bg = "cyan"} "ui.cursor.insert" = {fg = "base03", bg = "base3"} # 当前光标匹配的标点符号 "ui.cursor.match" = {modifiers = ["reversed"]} @@ -73,18 +87,20 @@ "error" = { fg = "red", modifiers= ["bold", "underlined"] } "info" = { fg = "blue", modifiers= ["bold", "underlined"] } "hint" = { fg = "base01", modifiers= ["bold", "underlined"] } -"diagnostic" = { mdifiers = ["underlined"] } +"diagnostic" = { modifiers = ["underlined"] } [palette] # 深色 越来越深 -base03 = "#002b36" -base02 = "#073642" -base01 = "#586e75" -base00 = "#657b83" -base0 = "#839496" -base1 = "#93a1a1" -base2 = "#eee8d5" -base3 = "#fdf6e3" +base03 = "#002b36" +base02 = "#073642" +base0175 = "#16404b" +base015 = "#2c4f59" +base01 = "#586e75" +base00 = "#657b83" +base0 = "#839496" +base1 = "#93a1a1" +base2 = "#eee8d5" +base3 = "#fdf6e3" # 浅色 越來越浅 yellow = "#b58900" diff --git a/runtime/themes/solarized_light.toml b/runtime/themes/solarized_light.toml index 0ab1b962..c8a3dee1 100644 --- a/runtime/themes/solarized_light.toml +++ b/runtime/themes/solarized_light.toml @@ -22,6 +22,20 @@ "module" = { fg = "violet" } "tag" = { fg = "magenta" } +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = { fg = "green" } +"diff.delta" = { fg = "orange" } +"diff.minus" = { fg = "red" } + # 背景 "ui.background" = { bg = "base03" } @@ -58,13 +72,13 @@ "ui.highlight" = { fg = "red", modifiers = ["bold", "italic", "underlined"] } # 主光标/selectio -"ui.cursor.primary" = {fg = "base03", bg = "base1"} -"ui.selection.primary" = { fg = "base03", bg = "base01" } -"ui.cursor.select" = {fg = "base02", bg = "green"} -"ui.selection" = { fg = "base02", bg = "yellow" } +"ui.cursor.primary" = { fg = "base03", bg = "base1" } +"ui.cursor.select" = { fg = "base02", bg = "cyan" } +"ui.selection" = { bg = "base0175" } +"ui.selection.primary" = { bg = "base015" } # normal模式的光标 -"ui.cursor" = {fg = "base03", bg = "green"} +"ui.cursor" = {fg = "base02", bg = "cyan"} "ui.cursor.insert" = {fg = "base03", bg = "base3"} # 当前光标匹配的标点符号 "ui.cursor.match" = {modifiers = ["reversed"]} @@ -73,26 +87,28 @@ "error" = { fg = "red", modifiers= ["bold", "underlined"] } "info" = { fg = "blue", modifiers= ["bold", "underlined"] } "hint" = { fg = "base01", modifiers= ["bold", "underlined"] } -"diagnostic" = { mdifiers = ["underlined"] } +"diagnostic" = { modifiers = ["underlined"] } [palette] -red = '#dc322f' -green = '#859900' -yellow = '#b58900' -blue = '#268bd2' -magenta = '#d33682' -cyan = '#2aa198' -orange = '#cb4b16' -violet = '#6c71c4' +red = '#dc322f' +green = '#859900' +yellow = '#b58900' +blue = '#268bd2' +magenta = '#d33682' +cyan = '#2aa198' +orange = '#cb4b16' +violet = '#6c71c4' # 深色 越来越深 -base0 = '#657b83' -base1 = '#586e75' -base2 = '#073642' -base3 = '#002b36' +base0 = '#657b83' +base1 = '#586e75' +base2 = '#073642' +base3 = '#002b36' ## 浅色 越來越浅 -base00 = '#839496' -base01 = '#93a1a1' -base02 = '#eee8d5' -base03 = '#fdf6e3' +base00 = '#839496' +base01 = '#93a1a1' +base015 = '#c5c8bd' +base0175 = '#dddbcc' +base02 = '#eee8d5' +base03 = '#fdf6e3' diff --git a/runtime/themes/spacebones_light.toml b/runtime/themes/spacebones_light.toml index 92f116ab..5318dc2d 100644 --- a/runtime/themes/spacebones_light.toml +++ b/runtime/themes/spacebones_light.toml @@ -30,6 +30,20 @@ "label" = "#b1951d" "module" = "#b1951d" +# TODO +"markup.heading" = "blue" +"markup.list" = "red" +"markup.bold" = { fg = "yellow", modifiers = ["bold"] } +"markup.italic" = { fg = "magenta", modifiers = ["italic"] } +"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] } +"markup.link.text" = "red" +"markup.quote" = "cyan" +"markup.raw" = "green" + +"diff.plus" = "#2d9574" +"diff.delta" = "#715ab1" +"diff.minus" = "#ba2f59" + "warning" = { fg = "#da8b55" } "error" = { fg = "#e0211d" } "info" = { fg = "#b1951d" } |