From 0ca8da6c5a41a4e54c64c46ae0db951dfdadf2bc Mon Sep 17 00:00:00 2001 From: Poliorcetics Date: Mon, 20 Jul 2026 16:26:08 +0000 Subject: [PATCH] themes, grammars: uniformize on `comment.{line,block}.documentation` (#16060) I tried both `comment.documentation._` and `comment._.documentation`, the latter was already used more so I went with it. --- runtime/themes/atlas-ragnarok.toml | 1 + runtime/themes/doom-one.toml | 3 ++- runtime/themes/eldritch.toml | 1 + runtime/themes/flatwhite.toml | 1 + runtime/themes/lapis_aquamarine.toml | 3 ++- runtime/themes/nvchad_solarized_dark.toml | 3 ++- runtime/themes/vim_dark_high_contrast.toml | 3 ++- runtime/queries/haskell/highlights.scm | 2 +- runtime/queries/nix/highlights.scm | 2 +- runtime/queries/nu/highlights.scm | 4 ++-- 10 file(s) changed, 15 insertion(s)(+), 8 deletion(s)(-) diff --git a/runtime/themes/atlas-ragnarok.toml b/runtime/themes/atlas-ragnarok.toml --- a/runtime/themes/atlas-ragnarok.toml +++ b/runtime/themes/atlas-ragnarok.toml @@ -11,6 +11,7 @@ "attribute" = "thunder_bright" "comment" = { fg = "fg_subtle", modifiers = ["italic"] } "comment.line" = { fg = "fg_subtle", modifiers = ["italic"] } +"comment.line.documentation" = { fg = "fg_muted", modifiers = ["italic"] } "comment.block" = { fg = "fg_subtle", modifiers = ["italic"] } "comment.block.documentation" = { fg = "fg_muted", modifiers = ["italic"] } "constant" = "thunder_bright" diff --git a/runtime/themes/doom-one.toml b/runtime/themes/doom-one.toml --- a/runtime/themes/doom-one.toml +++ b/runtime/themes/doom-one.toml @@ -33,7 +33,8 @@ "comment" = { fg = "grey" } "comment.line" = { fg = "grey" } "comment.block" = { fg = "grey" } -"comment.documentation" = { fg = "blue" } +"comment.line.documentation" = { fg = "blue" } +"comment.block.documentation" = { fg = "blue" } "keyword" = "blue" "keyword.control" = "blue" diff --git a/runtime/themes/eldritch.toml b/runtime/themes/eldritch.toml --- a/runtime/themes/eldritch.toml +++ b/runtime/themes/eldritch.toml @@ -7,6 +7,7 @@ "comment" = { fg = "comment" } "comment.block.documentation" = { fg = "comment" } "comment.block" = { fg = "comment" } +"comment.line.documentation" = { fg = "comment" } "comment.line" = { fg = "comment" } "constant" = { fg = "purple" } "constant.numeric" = { fg = "purple" } diff --git a/runtime/themes/flatwhite.toml b/runtime/themes/flatwhite.toml --- a/runtime/themes/flatwhite.toml +++ b/runtime/themes/flatwhite.toml @@ -4,6 +4,7 @@ "attribute" = { fg = "blue_text", bg = "blue_bg" } "comment" = { fg = "base2", bg = "base6" } "comment.line" = { fg = "base2", bg = "base6" } +"comment.line.documentation" = { fg = "base2", bg = "base6" } "comment.block" = { fg = "base2", bg = "base6" } "comment.block.documentation" = { fg = "base2", bg = "base6" } "constant" = { fg = "blue_text", bg = "blue_bg" } diff --git a/runtime/themes/lapis_aquamarine.toml b/runtime/themes/lapis_aquamarine.toml --- a/runtime/themes/lapis_aquamarine.toml +++ b/runtime/themes/lapis_aquamarine.toml @@ -31,7 +31,8 @@ "comment" = { fg = "grey", modifiers = ["italic"] } "comment.line" = { fg = "grey", modifiers = ["italic"] } "comment.block" = { fg = "grey", modifiers = ["italic"] } -"comment.documentation" = { fg = "blue", modifiers = ["italic"] } +"comment.line.documentation" = { fg = "blue", modifiers = ["italic"] } +"comment.block.documentation" = { fg = "blue", modifiers = ["italic"] } "keyword" = "blue" "keyword.storage" = "blue" # let keyword in rust diff --git a/runtime/themes/nvchad_solarized_dark.toml b/runtime/themes/nvchad_solarized_dark.toml --- a/runtime/themes/nvchad_solarized_dark.toml +++ b/runtime/themes/nvchad_solarized_dark.toml @@ -47,7 +47,8 @@ "function.call" = { fg = "blue" } "comment" = { fg = "base01" } -"comment.documentation" = { fg = "base01" } +"comment.line.documentation" = { fg = "base01" } +"comment.block.documentation" = { fg = "base01" } "string" = { fg = "green" } "string.regexp" = { fg = "cyan" } diff --git a/runtime/themes/vim_dark_high_contrast.toml b/runtime/themes/vim_dark_high_contrast.toml --- a/runtime/themes/vim_dark_high_contrast.toml +++ b/runtime/themes/vim_dark_high_contrast.toml @@ -39,7 +39,8 @@ "constant.character.escape" = "magenta" "string" = "red" "comment" = "light-black" -"comment.documentation" = "magenta" +"comment.line.documentation" = "magenta" +"comment.block.documentation" = "magenta" "label" = "green" "keyword" = "yellow" "keyword.directive" = "magenta" diff --git a/runtime/queries/haskell/highlights.scm b/runtime/queries/haskell/highlights.scm --- a/runtime/queries/haskell/highlights.scm +++ b/runtime/queries/haskell/highlights.scm @@ -35,7 +35,7 @@ (comment) @comment -((haddock) @comment.documentation) +((haddock) @comment.line.documentation) ; ---------------------------------------------------------------------------- ; Punctuation diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm --- a/runtime/queries/nix/highlights.scm +++ b/runtime/queries/nix/highlights.scm @@ -12,7 +12,7 @@ ; Comments ------------------------------------------------------------ (comment) @comment -(doc_comment) @comment.documentation +(doc_comment) @comment.line.documentation ; Keywords ------------------------------------------------------------ diff --git a/runtime/queries/nu/highlights.scm b/runtime/queries/nu/highlights.scm --- a/runtime/queries/nu/highlights.scm +++ b/runtime/queries/nu/highlights.scm @@ -372,12 +372,12 @@ [(comment) (shebang)] @comment -((comment)+ @comment.documentation +((comment)+ @comment.line.documentation . (decl_def)) (parameter - (comment) @comment.documentation) + (comment) @comment.line.documentation) (command head: ((cmd_identifier) @function.builtin -- tangled.sh