From cc759d3a91f08960a016f6a18c4afd6aeeeef512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Plagborg=20Bak=20S=C3=B8rensen?= <57013304+kpbaks@users.noreply.github.com> Date: Sat, 14 Mar 2026 15:25:48 +0100 Subject: [PATCH] Highlight builtin diff configuration values in `git-attributes` language (#15248) --- runtime/queries/git-attributes/highlights.scm | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/runtime/queries/git-attributes/highlights.scm b/runtime/queries/git-attributes/highlights.scm index 0b1415b5..9e4cdd67 100644 --- a/runtime/queries/git-attributes/highlights.scm +++ b/runtime/queries/git-attributes/highlights.scm @@ -7,3 +7,35 @@ (attribute_unset) @operator (attribute_set_to) @operator + +; Highlight builtin diff configuration +; The list of languages is taken from here https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header +(attribute_set_to + (attribute) @operator (#eq? @operator "diff") + (value) @variable.builtin (#any-of? @variable.builtin + "ada" + "bash" + "bibtex" + "cpp" + "csharp" + "css" + "dts" + "elixir" + "fortran" + "fountain" + "golang" + "html" + "java" + "kotlin" + "markdown" + "matlab" + "objc" + "pascal" + "perl" + "php" + "python" + "ruby" + "rust" + "scheme" + "tex" + )) -- 2.51.2