Skip to content

Commit

Permalink
feat(themes): jump-label for modus themes
Browse files Browse the repository at this point in the history
Add styling for jump-labels for modus themes. I couldn't find
any official approach here so picking `yello-cooler`. `cooler` is
used for other meta highlights by modus and yellow seems to be
used the least - only warnings, so there's little chance of colliding
with other highlights.
  • Loading branch information
matoous committed Apr 21, 2024
1 parent 26d9610 commit a2f1901
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
52 changes: 52 additions & 0 deletions runtime/queries/fga/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
(call_expression
function: (identifier) @function)

(call_expression
function: (selector_expression
field: (identifier) @function.method))

((type_identifier) @type.builtin
(#match? @type.builtin "^(string|int|map|uint|list|timestamp|bool|duration|double|ipaddress)$"))

(condition_declaration
name: (identifier) @function)

(version) @number

[
"*"
"/"
"%"
">>"
"<<"
"&"
"&^"
] @operator

[
"+"
"-"
"|"
"^"
] @operator

[
"or"
"and"
"but not"
] @operator

[
"model"
"schema"
"type"
"relations"
"define"
"from"
] @keyword

[
"condition"
] @keyword.function

(comment) @comment
1 change: 1 addition & 0 deletions runtime/themes/modus_operandi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ punctuation = "fg-dim"
"ui.virtual" = "bg-active"
"ui.virtual.ruler" = { bg = "bg-dim" }
"ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] }
"ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] }

"ui.selection" = { fg = "fg-main", bg = "bg-inactive" }
"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" }
Expand Down
1 change: 1 addition & 0 deletions runtime/themes/modus_vivendi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ punctuation = "fg-dim"
"ui.virtual" = "bg-active"
"ui.virtual.ruler" = { bg = "bg-dim" }
"ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] }
"ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] }

"ui.selection" = { fg = "fg-main", bg = "bg-inactive" }
"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" }
Expand Down

0 comments on commit a2f1901

Please sign in to comment.