Skip to content

Commit 7721ab0

Browse files
committed
Update Build Script & Bundled Resources
1 parent 331d5db commit 7721ab0

99 files changed

Lines changed: 5979 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
3.64 KB
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
[
17+
(record)
18+
(module)
19+
] @fold
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
((comment) @injection.content
17+
(#set! injection.language "comment"))
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
[
17+
(function_definition)
18+
(if_statement)
19+
(case_statement)
20+
(for_statement)
21+
(while_statement)
22+
(c_style_for_statement)
23+
(heredoc_redirect)
24+
] @fold
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
((comment) @injection.content
17+
(#set! injection.language "comment"))
18+
19+
((regex) @injection.content
20+
(#set! injection.language "regex"))
21+
22+
((heredoc_redirect
23+
(heredoc_body) @injection.content
24+
(heredoc_end) @injection.language)
25+
(#downcase! @injection.language))
26+
27+
; printf 'format'
28+
((command
29+
name: (command_name) @_command
30+
.
31+
argument: [
32+
(string) @injection.content
33+
(concatenation
34+
(string) @injection.content)
35+
(raw_string) @injection.content
36+
(concatenation
37+
(raw_string) @injection.content)
38+
])
39+
(#eq? @_command "printf")
40+
(#offset! @injection.content 0 1 0 -1)
41+
(#set! injection.include-children)
42+
(#set! injection.language "printf"))
43+
44+
; printf -v var 'format'
45+
((command
46+
name: (command_name) @_command
47+
argument: (word) @_arg
48+
.
49+
(_)
50+
.
51+
argument: [
52+
(string) @injection.content
53+
(concatenation
54+
(string) @injection.content)
55+
(raw_string) @injection.content
56+
(concatenation
57+
(raw_string) @injection.content)
58+
])
59+
(#eq? @_command "printf")
60+
(#eq? @_arg "-v")
61+
(#offset! @injection.content 0 1 0 -1)
62+
(#set! injection.include-children)
63+
(#set! injection.language "printf"))
64+
65+
; printf -- 'format'
66+
((command
67+
name: (command_name) @_command
68+
argument: (word) @_arg
69+
.
70+
argument: [
71+
(string) @injection.content
72+
(concatenation
73+
(string) @injection.content)
74+
(raw_string) @injection.content
75+
(concatenation
76+
(raw_string) @injection.content)
77+
])
78+
(#eq? @_command "printf")
79+
(#eq? @_arg "--")
80+
(#offset! @injection.content 0 1 0 -1)
81+
(#set! injection.include-children)
82+
(#set! injection.language "printf"))
83+
84+
((command
85+
name: (command_name) @_command
86+
.
87+
argument: [
88+
(string)
89+
(raw_string)
90+
] @injection.content)
91+
(#eq? @_command "bind")
92+
(#offset! @injection.content 0 1 0 -1)
93+
(#set! injection.include-children)
94+
(#set! injection.language "readline"))
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
; Scopes
17+
(function_definition) @local.scope
18+
19+
; Definitions
20+
(variable_assignment
21+
name: (variable_name) @local.definition.var)
22+
23+
(function_definition
24+
name: (word) @local.definition.function)
25+
26+
; References
27+
(variable_name) @local.reference
28+
29+
(word) @local.reference
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
body: [
17+
(declaration_list)
18+
(switch_body)
19+
(enum_member_declaration_list)
20+
] @fold
21+
22+
accessors: (accessor_list) @fold
23+
24+
initializer: (initializer_expression) @fold
25+
26+
[
27+
(block)
28+
(preproc_if)
29+
(preproc_elif)
30+
(preproc_else)
31+
(using_directive)+
32+
] @fold
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
((comment) @injection.content
17+
(#set! injection.language "comment"))
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
; Definitions
17+
(variable_declarator
18+
.
19+
(identifier) @local.definition.var)
20+
21+
(variable_declarator
22+
(tuple_pattern
23+
(identifier) @local.definition.var))
24+
25+
(declaration_expression
26+
name: (identifier) @local.definition.var)
27+
28+
(foreach_statement
29+
left: (identifier) @local.definition.var)
30+
31+
(foreach_statement
32+
left: (tuple_pattern
33+
(identifier) @local.definition.var))
34+
35+
(parameter
36+
(identifier) @local.definition.parameter)
37+
38+
(method_declaration
39+
name: (identifier) @local.definition.method)
40+
41+
(local_function_statement
42+
name: (identifier) @local.definition.method)
43+
44+
(property_declaration
45+
name: (identifier) @local.definition)
46+
47+
(type_parameter
48+
(identifier) @local.definition.type)
49+
50+
(class_declaration
51+
name: (identifier) @local.definition)
52+
53+
; References
54+
(identifier) @local.reference
55+
56+
; Scope
57+
(block) @local.scope
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
; Copyright 2025 nvim-treesitter
2+
;
3+
; Licensed under the Apache License, Version 2.0 (the "License");
4+
; you may not use this file except in compliance with the License.
5+
; You may obtain a copy of the License at
6+
;
7+
; http://www.apache.org/licenses/LICENSE-2.0
8+
;
9+
; Unless required by applicable law or agreed to in writing, software
10+
; distributed under the License is distributed on an "AS IS" BASIS,
11+
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
; See the License for the specific language governing permissions and
13+
; limitations under the License.
14+
15+
16+
[
17+
(for_statement)
18+
(if_statement)
19+
(while_statement)
20+
(do_statement)
21+
(switch_statement)
22+
(case_statement)
23+
(function_definition)
24+
(struct_specifier)
25+
(enum_specifier)
26+
(comment)
27+
(preproc_if)
28+
(preproc_elif)
29+
(preproc_else)
30+
(preproc_ifdef)
31+
(preproc_function_def)
32+
(initializer_list)
33+
(gnu_asm_expression)
34+
(preproc_include)+
35+
] @fold
36+
37+
(compound_statement
38+
(compound_statement) @fold)

0 commit comments

Comments
 (0)