aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/git_config/highlights.scm
blob: 557ac60ec7ac303722b5254ce881664899bdc0fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
; Sections
(section_name) @markup.heading

((section_name) @keyword.import
  (#eq? @keyword.import "include"))

((section_header
  (section_name) @keyword.import
  (subsection_name))
  (#any-of? @keyword.import "includeIf" "includeif"))

(variable
  (name) @property)

; Operators
"=" @operator

; Literals
(integer) @number

[
  (true)
  (false)
] @boolean

(string) @string

(escape_sequence) @string.escape

((string) @string.special.path
  (#lua-match? @string.special.path "^[.]?[.]?[/]"))

((string) @string.special.path
  (#lua-match? @string.special.path "^[~]"))

(section_header
  [
    "\""
    (subsection_name)
  ] @string.special)

((section_header
  (section_name) @_name
  (subsection_name) @string.special.url)
  (#any-of? @_name "credential" "url"))

((variable
  (name) @_name
  value: (string) @string.special.url)
  (#any-of? @_name "insteadOf" "insteadof"))

; Punctuation
[
  "["
  "]"
] @punctuation.bracket

; Comments
(comment) @comment @spell