Skip to content

Commit 8c11cc2

Browse files
committed
Update build
1 parent 3062c39 commit 8c11cc2

File tree

12 files changed

+258
-10
lines changed

12 files changed

+258
-10
lines changed

Sources/TreeSitterResource/LanguageResources/gomod/highlights.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"require"
33
"replace"
44
"go"
5+
"toolchain"
56
"exclude"
67
"retract"
78
"module"
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
;From MDeiml/tree-sitter-markdown & Helix
2+
(setext_heading
3+
(paragraph) @markup.heading.1
4+
(setext_h1_underline) @markup.heading.1.marker)
5+
6+
(setext_heading
7+
(paragraph) @markup.heading.2
8+
(setext_h2_underline) @markup.heading.2.marker)
9+
10+
(atx_heading
11+
(atx_h1_marker) @markup.heading.1.marker
12+
(inline) @markup.heading.1)
13+
14+
(atx_heading
15+
(atx_h2_marker) @markup.heading.2.marker
16+
(inline) @markup.heading.2)
17+
18+
(atx_heading
19+
(atx_h3_marker) @markup.heading.3.marker
20+
(inline) @markup.heading.3)
21+
22+
(atx_heading
23+
(atx_h4_marker) @markup.heading.4.marker
24+
(inline) @markup.heading.4)
25+
26+
(atx_heading
27+
(atx_h5_marker) @markup.heading.5.marker
28+
(inline) @markup.heading.5)
29+
30+
(atx_heading
31+
(atx_h6_marker) @markup.heading.6.marker
32+
(inline) @markup.heading.6)
33+
34+
(info_string) @label
35+
36+
(pipe_table_header
37+
(pipe_table_cell) @markup.heading)
38+
39+
(pipe_table_header
40+
"|" @punctuation.special)
41+
42+
(pipe_table_row
43+
"|" @punctuation.special)
44+
45+
(pipe_table_delimiter_row
46+
"|" @punctuation.special)
47+
48+
(pipe_table_delimiter_cell) @punctuation.special
49+
50+
; Code blocks (conceal backticks and language annotation)
51+
(indented_code_block) @markup.raw.block
52+
53+
((fenced_code_block) @markup.raw.block
54+
(#set! "priority" 90))
55+
56+
(fenced_code_block
57+
(fenced_code_block_delimiter) @markup.raw.delimiter
58+
(#set! conceal ""))
59+
60+
(fenced_code_block
61+
(info_string
62+
(language) @conceal
63+
(#set! conceal "")))
64+
65+
(link_destination) @markup.link.url
66+
67+
[
68+
(link_title)
69+
(link_label)
70+
] @markup.link.label
71+
72+
[
73+
(list_marker_plus)
74+
(list_marker_minus)
75+
(list_marker_star)
76+
(list_marker_dot)
77+
(list_marker_parenthesis)
78+
] @markup.list
79+
80+
; NOTE: The following has been commented out due to issues with spaces in the
81+
; list marker nodes generated by the parser. If those spaces ever get captured
82+
; by a different node (e.g. block_continuation) we can safely readd these
83+
; conceals.
84+
; ;; Conceal bullet points
85+
; ([(list_marker_plus) (list_marker_star)]
86+
; @punctuation.special
87+
; (#offset! @punctuation.special 0 0 0 -1)
88+
; (#set! conceal "•"))
89+
; ([(list_marker_plus) (list_marker_star)]
90+
; @punctuation.special
91+
; (#any-of? @punctuation.special "+" "*")
92+
; (#set! conceal "•"))
93+
; ((list_marker_minus)
94+
; @punctuation.special
95+
; (#offset! @punctuation.special 0 0 0 -1)
96+
; (#set! conceal "—"))
97+
; ((list_marker_minus)
98+
; @punctuation.special
99+
; (#eq? @punctuation.special "-")
100+
; (#set! conceal "—"))
101+
(thematic_break) @punctuation.special
102+
103+
(task_list_marker_unchecked) @markup.list.unchecked
104+
105+
(task_list_marker_checked) @markup.list.checked
106+
107+
((block_quote) @markup.quote
108+
(#set! "priority" 90))
109+
110+
[
111+
(block_continuation)
112+
(block_quote_marker)
113+
] @punctuation.special
114+
115+
(backslash_escape) @string.escape
116+
117+
(inline) @spell

Sources/TreeSitterResource/LanguageResources/php/highlights.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"extends" @keyword
9797
"final" @keyword
9898
"finally" @keyword
99+
"for" @keyword
99100
"foreach" @keyword
100101
"function" @keyword
101102
"global" @keyword
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
((text) @injection.content
2+
(#set! injection.language "html")
3+
(#set! injection.combined))
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
((text) @injection.content
2-
(#set! injection.language "html")
3-
(#set! injection.combined))
1+
((comment) @injection.content
2+
(#set! injection.language "phpdoc"))
3+
4+
(heredoc
5+
(heredoc_body) @injection.content
6+
(heredoc_end) @injection.language)
7+
8+
(nowdoc
9+
(nowdoc_body) @injection.content
10+
(heredoc_end) @injection.language)
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[
2+
; ... refers to the section that will get affected by this indent.begin capture
3+
(protocol_body) ; protocol Foo { ... }
4+
(class_body) ; class Foo { ... }
5+
(enum_class_body) ; enum Foo { ... }
6+
(function_declaration) ; func Foo (...) {...}
7+
(computed_property) ; { ... }
8+
(subscript_declaration) ; subscript Foo(...) { ... }
9+
10+
(computed_getter) ; get { ... }
11+
(computed_setter) ; set { ... }
12+
13+
(assignment) ; a = b
14+
15+
(control_transfer_statement) ; return ...
16+
(for_statement)
17+
(while_statement)
18+
(repeat_while_statement)
19+
(do_statement)
20+
(if_statement)
21+
(switch_statement)
22+
(guard_statement)
23+
24+
(type_parameters) ; x<Foo>
25+
(tuple_type) ; (...)
26+
(array_type) ; [String]
27+
(dictionary_type) ; [Foo: Bar]
28+
29+
(call_expression) ; callFunc(...)
30+
(tuple_expression) ; ( foo + bar )
31+
(array_literal) ; [ foo, bar ]
32+
(dictionary_literal) ; [ foo: bar, x: y ]
33+
(lambda_literal)
34+
] @indent.begin
35+
36+
; @something(...)
37+
((modifiers
38+
(attribute) @indent.begin))
39+
40+
(function_declaration
41+
(modifiers
42+
.
43+
(attribute)
44+
(_)* @indent.branch)
45+
.
46+
_ @indent.branch
47+
(#not-has-type? @indent.branch type_parameters parameter))
48+
49+
50+
(ERROR
51+
[
52+
"<"
53+
"{"
54+
"("
55+
"["
56+
]
57+
) @indent.begin
58+
59+
60+
; if-elseif
61+
(if_statement
62+
(if_statement) @indent.dedent)
63+
64+
; case Foo:
65+
; default Foo:
66+
; @attribute default Foo:
67+
(switch_entry . _ @indent.branch)
68+
69+
(function_declaration ")" @indent.branch)
70+
71+
(type_parameters ">" @indent.branch @indent.end .)
72+
(tuple_expression ")" @indent.branch @indent.end)
73+
(value_arguments ")" @indent.branch @indent.end)
74+
(tuple_type ")" @indent.branch @indent.end)
75+
(modifiers
76+
(attribute ")" @indent.branch @indent.end))
77+
78+
[
79+
"}"
80+
"]"
81+
] @indent.branch @indent.end
82+
83+
84+
[
85+
; (ERROR)
86+
(comment)
87+
(multiline_comment)
88+
(raw_str_part)
89+
(multi_line_string_literal)
90+
] @indent.auto
91+
92+
(directive) @indent.ignore
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
; MARK: Structure
4+
5+
(function_declaration
6+
body: (_) @function.inside) @function.around
7+
8+
; TODO: Classes/structs/enums
9+
10+
11+
; MARK: Tests
12+
13+
; Only matches prefix test. Other conventions
14+
; might be nice to add!
15+
(function_declaration
16+
name: (simple_identifier) @_name
17+
(#match? @_name "^test")
18+
)
19+

TreeSitter.xcframework/Info.plist

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<key>AvailableLibraries</key>
66
<array>
77
<dict>
8+
<key>BinaryPath</key>
9+
<string>TreeSitter.framework/TreeSitter</string>
810
<key>LibraryIdentifier</key>
9-
<string>ios-arm64_x86_64-maccatalyst</string>
11+
<string>ios-arm64_x86_64-simulator</string>
1012
<key>LibraryPath</key>
1113
<string>TreeSitter.framework</string>
1214
<key>SupportedArchitectures</key>
@@ -17,24 +19,25 @@
1719
<key>SupportedPlatform</key>
1820
<string>ios</string>
1921
<key>SupportedPlatformVariant</key>
20-
<string>maccatalyst</string>
22+
<string>simulator</string>
2123
</dict>
2224
<dict>
25+
<key>BinaryPath</key>
26+
<string>TreeSitter.framework/TreeSitter</string>
2327
<key>LibraryIdentifier</key>
24-
<string>ios-arm64_x86_64-simulator</string>
28+
<string>ios-arm64</string>
2529
<key>LibraryPath</key>
2630
<string>TreeSitter.framework</string>
2731
<key>SupportedArchitectures</key>
2832
<array>
2933
<string>arm64</string>
30-
<string>x86_64</string>
3134
</array>
3235
<key>SupportedPlatform</key>
3336
<string>ios</string>
34-
<key>SupportedPlatformVariant</key>
35-
<string>simulator</string>
3637
</dict>
3738
<dict>
39+
<key>BinaryPath</key>
40+
<string>TreeSitter.framework/Versions/A/TreeSitter</string>
3841
<key>LibraryIdentifier</key>
3942
<string>macos-arm64_x86_64</string>
4043
<key>LibraryPath</key>
@@ -48,16 +51,21 @@
4851
<string>macos</string>
4952
</dict>
5053
<dict>
54+
<key>BinaryPath</key>
55+
<string>TreeSitter.framework/TreeSitter</string>
5156
<key>LibraryIdentifier</key>
52-
<string>ios-arm64</string>
57+
<string>ios-arm64_x86_64-maccatalyst</string>
5358
<key>LibraryPath</key>
5459
<string>TreeSitter.framework</string>
5560
<key>SupportedArchitectures</key>
5661
<array>
5762
<string>arm64</string>
63+
<string>x86_64</string>
5864
</array>
5965
<key>SupportedPlatform</key>
6066
<string>ios</string>
67+
<key>SupportedPlatformVariant</key>
68+
<string>maccatalyst</string>
6169
</dict>
6270
</array>
6371
<key>CFBundlePackageType</key>
Binary file not shown.

0 commit comments

Comments
 (0)