aboutsummaryrefslogtreecommitdiffstats
path: root/queries/git_config/injections.scm
blob: dcccb21ba7b585389c08ec6cb01b9fbba15258c9 (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
((comment) @injection.content
  (#set! injection.language "comment"))

((variable
  (name) @_name
  value: (string) @injection.content)
  (#any-of? @_name "cmd" "command" "textconv")
  (#set! injection.language "bash"))

(section
  (section_header
    (section_name) @_alias)
  (variable
    value: (string) @injection.content)
  (#eq? @_alias "alias")
  (#lua-match? @injection.content "^!")
  (#offset! @injection.content 0 1 0 0)
  (#set! injection.language "bash"))

(section
  (section_header
    (section_name) @_alias)
  (variable
    value:
      (string
        "\""
        "\"") @injection.content)
  (#eq? @_alias "alias")
  (#lua-match? @injection.content "^\"!")
  (#offset! @injection.content 0 2 0 -1)
  (#set! injection.language "bash"))