fix(git_config): match lowercase Git config vars

Git config's sections, variable names, and (sometimes) subsections are
case-insensitive.  This commit proposes to match the full lowercase
variants in addition to the non-normalised, lowerCamelCase ones.

See `git help config`
This commit is contained in:
Éric NICOLAS 2025-05-31 02:26:17 +02:00 committed by Christian Clason
parent 01dd4b05cf
commit 9a51f860c1
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@
((section_header ((section_header
(section_name) @keyword.import (section_name) @keyword.import
(subsection_name)) (subsection_name))
(#eq? @keyword.import "includeIf")) (#any-of? @keyword.import "includeIf" "includeif"))
(variable (variable
(name) @property) (name) @property)
@ -47,7 +47,7 @@
((variable ((variable
(name) @_name (name) @_name
value: (string) @string.special.url) value: (string) @string.special.url)
(#eq? @_name "insteadOf")) (#any-of? @_name "insteadOf" "insteadof"))
; Punctuation ; Punctuation
[ [

View file

@ -4,7 +4,7 @@
((variable ((variable
(name) @_name (name) @_name
value: (string) @injection.content) value: (string) @injection.content)
(#any-of? @_name "cmd" "command" "textconv" "sendmailCmd") (#any-of? @_name "cmd" "command" "textconv" "sendmailCmd" "sendmailcmd")
(#set! injection.language "bash")) (#set! injection.language "bash"))
(section (section
@ -29,7 +29,7 @@
(name) @_name (name) @_name
value: (string) @injection.content) value: (string) @injection.content)
(#eq? @_interactive "interactive") (#eq? @_interactive "interactive")
(#eq? @_name "diffFilter") (#any-of? @_name "diffFilter" "difffilter")
(#set! injection.language "bash")) (#set! injection.language "bash"))
; https://github.com/git-lfs/git-lfs ; https://github.com/git-lfs/git-lfs