Unnamed repository; edit this file 'description' to name the repository.
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
((comment) @injection.content
 (#set! injection.language "comment"))

; ((section) @injection.content
;  (#set! injection.language "comment"))

((section 
  (attribute 
    (identifier) @_type
    (string) @_is_shader)
  (property 
    (path) @_is_code
    (string) @injection.content))
  (#eq? @_type "type")
  (#match? @_is_shader "Shader")
  (#eq? @_is_code "code")
  (#set! injection.language "glsl")
)

((section 
  (identifier) @_is_resource
  (property 
    (path) @_is_code
    (string) @injection.content))
  (#eq? @_is_resource "resource")
  (#eq? @_is_code "code")
  (#set! injection.language "glsl")
)

((section 
  (identifier) @_id
  (property 
    (path) @_is_expression
    (string) @injection.content))
  (#eq? @_id "sub_resource")
  (#eq? @_is_expression "expression")
  (#set! injection.language "glsl")
)

((section 
  (attribute 
    (identifier) @_type
    (string) @_is_shader)
  (property 
    (path) @_is_code
    (string) @injection.content))
  (#eq? @_type "type")
  (#match? @_is_shader "GDScript")
  (#eq? @_is_code "script/source")
  (#set! injection.language "gdscript")
)