From a2f1901981f95a431c0829ad71793dd99b0fca56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Dzivjak?= Date: Sun, 21 Apr 2024 15:08:15 +0200 Subject: [PATCH] feat(themes): jump-label for modus themes 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. --- runtime/queries/fga/highlights.scm | 52 ++++++++++++++++++++++++++++++ runtime/themes/modus_operandi.toml | 1 + runtime/themes/modus_vivendi.toml | 1 + 3 files changed, 54 insertions(+) create mode 100644 runtime/queries/fga/highlights.scm diff --git a/runtime/queries/fga/highlights.scm b/runtime/queries/fga/highlights.scm new file mode 100644 index 0000000000000..8d3093952f556 --- /dev/null +++ b/runtime/queries/fga/highlights.scm @@ -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 diff --git a/runtime/themes/modus_operandi.toml b/runtime/themes/modus_operandi.toml index e7599c018c0a8..362f97778d33b 100644 --- a/runtime/themes/modus_operandi.toml +++ b/runtime/themes/modus_operandi.toml @@ -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" } diff --git a/runtime/themes/modus_vivendi.toml b/runtime/themes/modus_vivendi.toml index 74974bcb2ce32..952683ee72130 100644 --- a/runtime/themes/modus_vivendi.toml +++ b/runtime/themes/modus_vivendi.toml @@ -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" }