@akonwi/kit 0.7.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kit +0 -0
- package/dist/plugin.d.ts +0 -1
- package/dist/runtime/grammars/bash/highlights.scm +56 -0
- package/dist/runtime/grammars/bash/tree-sitter-bash.wasm +0 -0
- package/dist/runtime/grammars/css/highlights.scm +76 -0
- package/dist/runtime/grammars/css/tree-sitter-css.wasm +0 -0
- package/dist/runtime/grammars/go/highlights.scm +123 -0
- package/dist/runtime/grammars/go/tree-sitter-go.wasm +0 -0
- package/dist/runtime/grammars/html/highlights.scm +13 -0
- package/dist/runtime/grammars/html/tree-sitter-html.wasm +0 -0
- package/dist/runtime/grammars/json/highlights.scm +16 -0
- package/dist/runtime/grammars/json/tree-sitter-json.wasm +0 -0
- package/dist/runtime/grammars/python/highlights.scm +137 -0
- package/dist/runtime/grammars/python/tree-sitter-python.wasm +0 -0
- package/dist/runtime/grammars/ruby/highlights.scm +154 -0
- package/dist/runtime/grammars/ruby/tree-sitter-ruby.wasm +0 -0
- package/dist/runtime/grammars/rust/highlights.scm +161 -0
- package/dist/runtime/grammars/rust/tree-sitter-rust.wasm +0 -0
- package/dist/runtime/grammars/toml/highlights.scm +53 -0
- package/dist/runtime/grammars/toml/tree-sitter-toml.wasm +0 -0
- package/dist/runtime/grammars/yaml/highlights.scm +79 -0
- package/dist/runtime/grammars/yaml/tree-sitter-yaml.wasm +0 -0
- package/docs/features/plugins.md +1 -1
- package/package.json +1 -1
package/dist/kit
CHANGED
|
Binary file
|
package/dist/plugin.d.ts
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[
|
|
2
|
+
(string)
|
|
3
|
+
(raw_string)
|
|
4
|
+
(heredoc_body)
|
|
5
|
+
(heredoc_start)
|
|
6
|
+
] @string
|
|
7
|
+
|
|
8
|
+
(command_name) @function
|
|
9
|
+
|
|
10
|
+
(variable_name) @property
|
|
11
|
+
|
|
12
|
+
[
|
|
13
|
+
"case"
|
|
14
|
+
"do"
|
|
15
|
+
"done"
|
|
16
|
+
"elif"
|
|
17
|
+
"else"
|
|
18
|
+
"esac"
|
|
19
|
+
"export"
|
|
20
|
+
"fi"
|
|
21
|
+
"for"
|
|
22
|
+
"function"
|
|
23
|
+
"if"
|
|
24
|
+
"in"
|
|
25
|
+
"select"
|
|
26
|
+
"then"
|
|
27
|
+
"unset"
|
|
28
|
+
"until"
|
|
29
|
+
"while"
|
|
30
|
+
] @keyword
|
|
31
|
+
|
|
32
|
+
(comment) @comment
|
|
33
|
+
|
|
34
|
+
(function_definition name: (word) @function)
|
|
35
|
+
|
|
36
|
+
(file_descriptor) @number
|
|
37
|
+
|
|
38
|
+
[
|
|
39
|
+
(command_substitution)
|
|
40
|
+
(process_substitution)
|
|
41
|
+
(expansion)
|
|
42
|
+
]@embedded
|
|
43
|
+
|
|
44
|
+
[
|
|
45
|
+
"$"
|
|
46
|
+
"&&"
|
|
47
|
+
">"
|
|
48
|
+
">>"
|
|
49
|
+
"<"
|
|
50
|
+
"|"
|
|
51
|
+
] @operator
|
|
52
|
+
|
|
53
|
+
(
|
|
54
|
+
(command (_) @constant)
|
|
55
|
+
(#match? @constant "^-")
|
|
56
|
+
)
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
(comment) @comment
|
|
2
|
+
|
|
3
|
+
(tag_name) @tag
|
|
4
|
+
(nesting_selector) @tag
|
|
5
|
+
(universal_selector) @tag
|
|
6
|
+
|
|
7
|
+
"~" @operator
|
|
8
|
+
">" @operator
|
|
9
|
+
"+" @operator
|
|
10
|
+
"-" @operator
|
|
11
|
+
"*" @operator
|
|
12
|
+
"/" @operator
|
|
13
|
+
"=" @operator
|
|
14
|
+
"^=" @operator
|
|
15
|
+
"|=" @operator
|
|
16
|
+
"~=" @operator
|
|
17
|
+
"$=" @operator
|
|
18
|
+
"*=" @operator
|
|
19
|
+
|
|
20
|
+
"and" @operator
|
|
21
|
+
"or" @operator
|
|
22
|
+
"not" @operator
|
|
23
|
+
"only" @operator
|
|
24
|
+
|
|
25
|
+
(attribute_selector (plain_value) @string)
|
|
26
|
+
|
|
27
|
+
((property_name) @variable
|
|
28
|
+
(#match? @variable "^--"))
|
|
29
|
+
((plain_value) @variable
|
|
30
|
+
(#match? @variable "^--"))
|
|
31
|
+
|
|
32
|
+
(class_name) @property
|
|
33
|
+
(id_name) @property
|
|
34
|
+
(namespace_name) @property
|
|
35
|
+
(property_name) @property
|
|
36
|
+
(feature_name) @property
|
|
37
|
+
|
|
38
|
+
(pseudo_element_selector (tag_name) @attribute)
|
|
39
|
+
(pseudo_class_selector (class_name) @attribute)
|
|
40
|
+
(attribute_name) @attribute
|
|
41
|
+
|
|
42
|
+
(function_name) @function
|
|
43
|
+
|
|
44
|
+
"@media" @keyword
|
|
45
|
+
"@import" @keyword
|
|
46
|
+
"@charset" @keyword
|
|
47
|
+
"@namespace" @keyword
|
|
48
|
+
"@supports" @keyword
|
|
49
|
+
"@keyframes" @keyword
|
|
50
|
+
(at_keyword) @keyword
|
|
51
|
+
(to) @keyword
|
|
52
|
+
(from) @keyword
|
|
53
|
+
(important) @keyword
|
|
54
|
+
|
|
55
|
+
(string_value) @string
|
|
56
|
+
(color_value) @string.special
|
|
57
|
+
|
|
58
|
+
(integer_value) @number
|
|
59
|
+
(float_value) @number
|
|
60
|
+
(unit) @type
|
|
61
|
+
|
|
62
|
+
[
|
|
63
|
+
"#"
|
|
64
|
+
","
|
|
65
|
+
"."
|
|
66
|
+
":"
|
|
67
|
+
"::"
|
|
68
|
+
";"
|
|
69
|
+
] @punctuation.delimiter
|
|
70
|
+
|
|
71
|
+
[
|
|
72
|
+
"{"
|
|
73
|
+
")"
|
|
74
|
+
"("
|
|
75
|
+
"}"
|
|
76
|
+
] @punctuation.bracket
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
; Function calls
|
|
2
|
+
|
|
3
|
+
(call_expression
|
|
4
|
+
function: (identifier) @function)
|
|
5
|
+
|
|
6
|
+
(call_expression
|
|
7
|
+
function: (identifier) @function.builtin
|
|
8
|
+
(#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))
|
|
9
|
+
|
|
10
|
+
(call_expression
|
|
11
|
+
function: (selector_expression
|
|
12
|
+
field: (field_identifier) @function.method))
|
|
13
|
+
|
|
14
|
+
; Function definitions
|
|
15
|
+
|
|
16
|
+
(function_declaration
|
|
17
|
+
name: (identifier) @function)
|
|
18
|
+
|
|
19
|
+
(method_declaration
|
|
20
|
+
name: (field_identifier) @function.method)
|
|
21
|
+
|
|
22
|
+
; Identifiers
|
|
23
|
+
|
|
24
|
+
(type_identifier) @type
|
|
25
|
+
(field_identifier) @property
|
|
26
|
+
(identifier) @variable
|
|
27
|
+
|
|
28
|
+
; Operators
|
|
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
|
+
"=="
|
|
60
|
+
">"
|
|
61
|
+
">="
|
|
62
|
+
">>"
|
|
63
|
+
">>="
|
|
64
|
+
"|"
|
|
65
|
+
"|="
|
|
66
|
+
"||"
|
|
67
|
+
"~"
|
|
68
|
+
] @operator
|
|
69
|
+
|
|
70
|
+
; Keywords
|
|
71
|
+
|
|
72
|
+
[
|
|
73
|
+
"break"
|
|
74
|
+
"case"
|
|
75
|
+
"chan"
|
|
76
|
+
"const"
|
|
77
|
+
"continue"
|
|
78
|
+
"default"
|
|
79
|
+
"defer"
|
|
80
|
+
"else"
|
|
81
|
+
"fallthrough"
|
|
82
|
+
"for"
|
|
83
|
+
"func"
|
|
84
|
+
"go"
|
|
85
|
+
"goto"
|
|
86
|
+
"if"
|
|
87
|
+
"import"
|
|
88
|
+
"interface"
|
|
89
|
+
"map"
|
|
90
|
+
"package"
|
|
91
|
+
"range"
|
|
92
|
+
"return"
|
|
93
|
+
"select"
|
|
94
|
+
"struct"
|
|
95
|
+
"switch"
|
|
96
|
+
"type"
|
|
97
|
+
"var"
|
|
98
|
+
] @keyword
|
|
99
|
+
|
|
100
|
+
; Literals
|
|
101
|
+
|
|
102
|
+
[
|
|
103
|
+
(interpreted_string_literal)
|
|
104
|
+
(raw_string_literal)
|
|
105
|
+
(rune_literal)
|
|
106
|
+
] @string
|
|
107
|
+
|
|
108
|
+
(escape_sequence) @escape
|
|
109
|
+
|
|
110
|
+
[
|
|
111
|
+
(int_literal)
|
|
112
|
+
(float_literal)
|
|
113
|
+
(imaginary_literal)
|
|
114
|
+
] @number
|
|
115
|
+
|
|
116
|
+
[
|
|
117
|
+
(true)
|
|
118
|
+
(false)
|
|
119
|
+
(nil)
|
|
120
|
+
(iota)
|
|
121
|
+
] @constant.builtin
|
|
122
|
+
|
|
123
|
+
(comment) @comment
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
; Identifier naming conventions
|
|
2
|
+
|
|
3
|
+
(identifier) @variable
|
|
4
|
+
|
|
5
|
+
((identifier) @constructor
|
|
6
|
+
(#match? @constructor "^[A-Z]"))
|
|
7
|
+
|
|
8
|
+
((identifier) @constant
|
|
9
|
+
(#match? @constant "^[A-Z][A-Z_]*$"))
|
|
10
|
+
|
|
11
|
+
; Function calls
|
|
12
|
+
|
|
13
|
+
(decorator) @function
|
|
14
|
+
(decorator
|
|
15
|
+
(identifier) @function)
|
|
16
|
+
|
|
17
|
+
(call
|
|
18
|
+
function: (attribute attribute: (identifier) @function.method))
|
|
19
|
+
(call
|
|
20
|
+
function: (identifier) @function)
|
|
21
|
+
|
|
22
|
+
; Builtin functions
|
|
23
|
+
|
|
24
|
+
((call
|
|
25
|
+
function: (identifier) @function.builtin)
|
|
26
|
+
(#match?
|
|
27
|
+
@function.builtin
|
|
28
|
+
"^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
|
|
29
|
+
|
|
30
|
+
; Function definitions
|
|
31
|
+
|
|
32
|
+
(function_definition
|
|
33
|
+
name: (identifier) @function)
|
|
34
|
+
|
|
35
|
+
(attribute attribute: (identifier) @property)
|
|
36
|
+
(type (identifier) @type)
|
|
37
|
+
|
|
38
|
+
; Literals
|
|
39
|
+
|
|
40
|
+
[
|
|
41
|
+
(none)
|
|
42
|
+
(true)
|
|
43
|
+
(false)
|
|
44
|
+
] @constant.builtin
|
|
45
|
+
|
|
46
|
+
[
|
|
47
|
+
(integer)
|
|
48
|
+
(float)
|
|
49
|
+
] @number
|
|
50
|
+
|
|
51
|
+
(comment) @comment
|
|
52
|
+
(string) @string
|
|
53
|
+
(escape_sequence) @escape
|
|
54
|
+
|
|
55
|
+
(interpolation
|
|
56
|
+
"{" @punctuation.special
|
|
57
|
+
"}" @punctuation.special) @embedded
|
|
58
|
+
|
|
59
|
+
[
|
|
60
|
+
"-"
|
|
61
|
+
"-="
|
|
62
|
+
"!="
|
|
63
|
+
"*"
|
|
64
|
+
"**"
|
|
65
|
+
"**="
|
|
66
|
+
"*="
|
|
67
|
+
"/"
|
|
68
|
+
"//"
|
|
69
|
+
"//="
|
|
70
|
+
"/="
|
|
71
|
+
"&"
|
|
72
|
+
"&="
|
|
73
|
+
"%"
|
|
74
|
+
"%="
|
|
75
|
+
"^"
|
|
76
|
+
"^="
|
|
77
|
+
"+"
|
|
78
|
+
"->"
|
|
79
|
+
"+="
|
|
80
|
+
"<"
|
|
81
|
+
"<<"
|
|
82
|
+
"<<="
|
|
83
|
+
"<="
|
|
84
|
+
"<>"
|
|
85
|
+
"="
|
|
86
|
+
":="
|
|
87
|
+
"=="
|
|
88
|
+
">"
|
|
89
|
+
">="
|
|
90
|
+
">>"
|
|
91
|
+
">>="
|
|
92
|
+
"|"
|
|
93
|
+
"|="
|
|
94
|
+
"~"
|
|
95
|
+
"@="
|
|
96
|
+
"and"
|
|
97
|
+
"in"
|
|
98
|
+
"is"
|
|
99
|
+
"not"
|
|
100
|
+
"or"
|
|
101
|
+
"is not"
|
|
102
|
+
"not in"
|
|
103
|
+
] @operator
|
|
104
|
+
|
|
105
|
+
[
|
|
106
|
+
"as"
|
|
107
|
+
"assert"
|
|
108
|
+
"async"
|
|
109
|
+
"await"
|
|
110
|
+
"break"
|
|
111
|
+
"class"
|
|
112
|
+
"continue"
|
|
113
|
+
"def"
|
|
114
|
+
"del"
|
|
115
|
+
"elif"
|
|
116
|
+
"else"
|
|
117
|
+
"except"
|
|
118
|
+
"exec"
|
|
119
|
+
"finally"
|
|
120
|
+
"for"
|
|
121
|
+
"from"
|
|
122
|
+
"global"
|
|
123
|
+
"if"
|
|
124
|
+
"import"
|
|
125
|
+
"lambda"
|
|
126
|
+
"nonlocal"
|
|
127
|
+
"pass"
|
|
128
|
+
"print"
|
|
129
|
+
"raise"
|
|
130
|
+
"return"
|
|
131
|
+
"try"
|
|
132
|
+
"while"
|
|
133
|
+
"with"
|
|
134
|
+
"yield"
|
|
135
|
+
"match"
|
|
136
|
+
"case"
|
|
137
|
+
] @keyword
|
|
Binary file
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
(identifier) @variable
|
|
2
|
+
|
|
3
|
+
((identifier) @function.method
|
|
4
|
+
(#is-not? local))
|
|
5
|
+
|
|
6
|
+
[
|
|
7
|
+
"alias"
|
|
8
|
+
"and"
|
|
9
|
+
"begin"
|
|
10
|
+
"break"
|
|
11
|
+
"case"
|
|
12
|
+
"class"
|
|
13
|
+
"def"
|
|
14
|
+
"do"
|
|
15
|
+
"else"
|
|
16
|
+
"elsif"
|
|
17
|
+
"end"
|
|
18
|
+
"ensure"
|
|
19
|
+
"for"
|
|
20
|
+
"if"
|
|
21
|
+
"in"
|
|
22
|
+
"module"
|
|
23
|
+
"next"
|
|
24
|
+
"or"
|
|
25
|
+
"rescue"
|
|
26
|
+
"retry"
|
|
27
|
+
"return"
|
|
28
|
+
"then"
|
|
29
|
+
"unless"
|
|
30
|
+
"until"
|
|
31
|
+
"when"
|
|
32
|
+
"while"
|
|
33
|
+
"yield"
|
|
34
|
+
] @keyword
|
|
35
|
+
|
|
36
|
+
((identifier) @keyword
|
|
37
|
+
(#match? @keyword "^(private|protected|public)$"))
|
|
38
|
+
|
|
39
|
+
(constant) @constructor
|
|
40
|
+
|
|
41
|
+
; Function calls
|
|
42
|
+
|
|
43
|
+
"defined?" @function.method.builtin
|
|
44
|
+
|
|
45
|
+
(call
|
|
46
|
+
method: [(identifier) (constant)] @function.method)
|
|
47
|
+
|
|
48
|
+
((identifier) @function.method.builtin
|
|
49
|
+
(#eq? @function.method.builtin "require"))
|
|
50
|
+
|
|
51
|
+
; Function definitions
|
|
52
|
+
|
|
53
|
+
(alias (identifier) @function.method)
|
|
54
|
+
(setter (identifier) @function.method)
|
|
55
|
+
(method name: [(identifier) (constant)] @function.method)
|
|
56
|
+
(singleton_method name: [(identifier) (constant)] @function.method)
|
|
57
|
+
|
|
58
|
+
; Identifiers
|
|
59
|
+
|
|
60
|
+
[
|
|
61
|
+
(class_variable)
|
|
62
|
+
(instance_variable)
|
|
63
|
+
] @property
|
|
64
|
+
|
|
65
|
+
((identifier) @constant.builtin
|
|
66
|
+
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
|
67
|
+
|
|
68
|
+
(file) @constant.builtin
|
|
69
|
+
(line) @constant.builtin
|
|
70
|
+
(encoding) @constant.builtin
|
|
71
|
+
|
|
72
|
+
(hash_splat_nil
|
|
73
|
+
"**" @operator) @constant.builtin
|
|
74
|
+
|
|
75
|
+
((constant) @constant
|
|
76
|
+
(#match? @constant "^[A-Z\\d_]+$"))
|
|
77
|
+
|
|
78
|
+
[
|
|
79
|
+
(self)
|
|
80
|
+
(super)
|
|
81
|
+
] @variable.builtin
|
|
82
|
+
|
|
83
|
+
(block_parameter (identifier) @variable.parameter)
|
|
84
|
+
(block_parameters (identifier) @variable.parameter)
|
|
85
|
+
(destructured_parameter (identifier) @variable.parameter)
|
|
86
|
+
(hash_splat_parameter (identifier) @variable.parameter)
|
|
87
|
+
(lambda_parameters (identifier) @variable.parameter)
|
|
88
|
+
(method_parameters (identifier) @variable.parameter)
|
|
89
|
+
(splat_parameter (identifier) @variable.parameter)
|
|
90
|
+
|
|
91
|
+
(keyword_parameter name: (identifier) @variable.parameter)
|
|
92
|
+
(optional_parameter name: (identifier) @variable.parameter)
|
|
93
|
+
|
|
94
|
+
; Literals
|
|
95
|
+
|
|
96
|
+
[
|
|
97
|
+
(string)
|
|
98
|
+
(bare_string)
|
|
99
|
+
(subshell)
|
|
100
|
+
(heredoc_body)
|
|
101
|
+
(heredoc_beginning)
|
|
102
|
+
] @string
|
|
103
|
+
|
|
104
|
+
[
|
|
105
|
+
(simple_symbol)
|
|
106
|
+
(delimited_symbol)
|
|
107
|
+
(hash_key_symbol)
|
|
108
|
+
(bare_symbol)
|
|
109
|
+
] @string.special.symbol
|
|
110
|
+
|
|
111
|
+
(regex) @string.special.regex
|
|
112
|
+
(escape_sequence) @escape
|
|
113
|
+
|
|
114
|
+
[
|
|
115
|
+
(integer)
|
|
116
|
+
(float)
|
|
117
|
+
] @number
|
|
118
|
+
|
|
119
|
+
[
|
|
120
|
+
(nil)
|
|
121
|
+
(true)
|
|
122
|
+
(false)
|
|
123
|
+
] @constant.builtin
|
|
124
|
+
|
|
125
|
+
(interpolation
|
|
126
|
+
"#{" @punctuation.special
|
|
127
|
+
"}" @punctuation.special) @embedded
|
|
128
|
+
|
|
129
|
+
(comment) @comment
|
|
130
|
+
|
|
131
|
+
; Operators
|
|
132
|
+
|
|
133
|
+
[
|
|
134
|
+
"="
|
|
135
|
+
"=>"
|
|
136
|
+
"->"
|
|
137
|
+
] @operator
|
|
138
|
+
|
|
139
|
+
[
|
|
140
|
+
","
|
|
141
|
+
";"
|
|
142
|
+
"."
|
|
143
|
+
] @punctuation.delimiter
|
|
144
|
+
|
|
145
|
+
[
|
|
146
|
+
"("
|
|
147
|
+
")"
|
|
148
|
+
"["
|
|
149
|
+
"]"
|
|
150
|
+
"{"
|
|
151
|
+
"}"
|
|
152
|
+
"%w("
|
|
153
|
+
"%i("
|
|
154
|
+
] @punctuation.bracket
|
|
Binary file
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
; Identifiers
|
|
2
|
+
|
|
3
|
+
(type_identifier) @type
|
|
4
|
+
(primitive_type) @type.builtin
|
|
5
|
+
(field_identifier) @property
|
|
6
|
+
|
|
7
|
+
; Identifier conventions
|
|
8
|
+
|
|
9
|
+
; Assume all-caps names are constants
|
|
10
|
+
((identifier) @constant
|
|
11
|
+
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
|
12
|
+
|
|
13
|
+
; Assume uppercase names are enum constructors
|
|
14
|
+
((identifier) @constructor
|
|
15
|
+
(#match? @constructor "^[A-Z]"))
|
|
16
|
+
|
|
17
|
+
; Assume that uppercase names in paths are types
|
|
18
|
+
((scoped_identifier
|
|
19
|
+
path: (identifier) @type)
|
|
20
|
+
(#match? @type "^[A-Z]"))
|
|
21
|
+
((scoped_identifier
|
|
22
|
+
path: (scoped_identifier
|
|
23
|
+
name: (identifier) @type))
|
|
24
|
+
(#match? @type "^[A-Z]"))
|
|
25
|
+
((scoped_type_identifier
|
|
26
|
+
path: (identifier) @type)
|
|
27
|
+
(#match? @type "^[A-Z]"))
|
|
28
|
+
((scoped_type_identifier
|
|
29
|
+
path: (scoped_identifier
|
|
30
|
+
name: (identifier) @type))
|
|
31
|
+
(#match? @type "^[A-Z]"))
|
|
32
|
+
|
|
33
|
+
; Assume all qualified names in struct patterns are enum constructors. (They're
|
|
34
|
+
; either that, or struct names; highlighting both as constructors seems to be
|
|
35
|
+
; the less glaring choice of error, visually.)
|
|
36
|
+
(struct_pattern
|
|
37
|
+
type: (scoped_type_identifier
|
|
38
|
+
name: (type_identifier) @constructor))
|
|
39
|
+
|
|
40
|
+
; Function calls
|
|
41
|
+
|
|
42
|
+
(call_expression
|
|
43
|
+
function: (identifier) @function)
|
|
44
|
+
(call_expression
|
|
45
|
+
function: (field_expression
|
|
46
|
+
field: (field_identifier) @function.method))
|
|
47
|
+
(call_expression
|
|
48
|
+
function: (scoped_identifier
|
|
49
|
+
"::"
|
|
50
|
+
name: (identifier) @function))
|
|
51
|
+
|
|
52
|
+
(generic_function
|
|
53
|
+
function: (identifier) @function)
|
|
54
|
+
(generic_function
|
|
55
|
+
function: (scoped_identifier
|
|
56
|
+
name: (identifier) @function))
|
|
57
|
+
(generic_function
|
|
58
|
+
function: (field_expression
|
|
59
|
+
field: (field_identifier) @function.method))
|
|
60
|
+
|
|
61
|
+
(macro_invocation
|
|
62
|
+
macro: (identifier) @function.macro
|
|
63
|
+
"!" @function.macro)
|
|
64
|
+
|
|
65
|
+
; Function definitions
|
|
66
|
+
|
|
67
|
+
(function_item (identifier) @function)
|
|
68
|
+
(function_signature_item (identifier) @function)
|
|
69
|
+
|
|
70
|
+
(line_comment) @comment
|
|
71
|
+
(block_comment) @comment
|
|
72
|
+
|
|
73
|
+
(line_comment (doc_comment)) @comment.documentation
|
|
74
|
+
(block_comment (doc_comment)) @comment.documentation
|
|
75
|
+
|
|
76
|
+
"(" @punctuation.bracket
|
|
77
|
+
")" @punctuation.bracket
|
|
78
|
+
"[" @punctuation.bracket
|
|
79
|
+
"]" @punctuation.bracket
|
|
80
|
+
"{" @punctuation.bracket
|
|
81
|
+
"}" @punctuation.bracket
|
|
82
|
+
|
|
83
|
+
(type_arguments
|
|
84
|
+
"<" @punctuation.bracket
|
|
85
|
+
">" @punctuation.bracket)
|
|
86
|
+
(type_parameters
|
|
87
|
+
"<" @punctuation.bracket
|
|
88
|
+
">" @punctuation.bracket)
|
|
89
|
+
|
|
90
|
+
"::" @punctuation.delimiter
|
|
91
|
+
":" @punctuation.delimiter
|
|
92
|
+
"." @punctuation.delimiter
|
|
93
|
+
"," @punctuation.delimiter
|
|
94
|
+
";" @punctuation.delimiter
|
|
95
|
+
|
|
96
|
+
(parameter (identifier) @variable.parameter)
|
|
97
|
+
|
|
98
|
+
(lifetime (identifier) @label)
|
|
99
|
+
|
|
100
|
+
"as" @keyword
|
|
101
|
+
"async" @keyword
|
|
102
|
+
"await" @keyword
|
|
103
|
+
"break" @keyword
|
|
104
|
+
"const" @keyword
|
|
105
|
+
"continue" @keyword
|
|
106
|
+
"default" @keyword
|
|
107
|
+
"dyn" @keyword
|
|
108
|
+
"else" @keyword
|
|
109
|
+
"enum" @keyword
|
|
110
|
+
"extern" @keyword
|
|
111
|
+
"fn" @keyword
|
|
112
|
+
"for" @keyword
|
|
113
|
+
"gen" @keyword
|
|
114
|
+
"if" @keyword
|
|
115
|
+
"impl" @keyword
|
|
116
|
+
"in" @keyword
|
|
117
|
+
"let" @keyword
|
|
118
|
+
"loop" @keyword
|
|
119
|
+
"macro_rules!" @keyword
|
|
120
|
+
"match" @keyword
|
|
121
|
+
"mod" @keyword
|
|
122
|
+
"move" @keyword
|
|
123
|
+
"pub" @keyword
|
|
124
|
+
"raw" @keyword
|
|
125
|
+
"ref" @keyword
|
|
126
|
+
"return" @keyword
|
|
127
|
+
"static" @keyword
|
|
128
|
+
"struct" @keyword
|
|
129
|
+
"trait" @keyword
|
|
130
|
+
"type" @keyword
|
|
131
|
+
"union" @keyword
|
|
132
|
+
"unsafe" @keyword
|
|
133
|
+
"use" @keyword
|
|
134
|
+
"where" @keyword
|
|
135
|
+
"while" @keyword
|
|
136
|
+
"yield" @keyword
|
|
137
|
+
(crate) @keyword
|
|
138
|
+
(mutable_specifier) @keyword
|
|
139
|
+
(use_list (self) @keyword)
|
|
140
|
+
(scoped_use_list (self) @keyword)
|
|
141
|
+
(scoped_identifier (self) @keyword)
|
|
142
|
+
(super) @keyword
|
|
143
|
+
|
|
144
|
+
(self) @variable.builtin
|
|
145
|
+
|
|
146
|
+
(char_literal) @string
|
|
147
|
+
(string_literal) @string
|
|
148
|
+
(raw_string_literal) @string
|
|
149
|
+
|
|
150
|
+
(boolean_literal) @constant.builtin
|
|
151
|
+
(integer_literal) @constant.builtin
|
|
152
|
+
(float_literal) @constant.builtin
|
|
153
|
+
|
|
154
|
+
(escape_sequence) @escape
|
|
155
|
+
|
|
156
|
+
(attribute_item) @attribute
|
|
157
|
+
(inner_attribute_item) @attribute
|
|
158
|
+
|
|
159
|
+
"*" @operator
|
|
160
|
+
"&" @operator
|
|
161
|
+
"'" @operator
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
; Properties
|
|
2
|
+
;-----------
|
|
3
|
+
|
|
4
|
+
(bare_key) @type
|
|
5
|
+
|
|
6
|
+
(quoted_key) @string
|
|
7
|
+
|
|
8
|
+
(pair
|
|
9
|
+
(bare_key)) @property
|
|
10
|
+
|
|
11
|
+
(pair
|
|
12
|
+
(dotted_key
|
|
13
|
+
(bare_key) @property))
|
|
14
|
+
|
|
15
|
+
; Literals
|
|
16
|
+
;---------
|
|
17
|
+
|
|
18
|
+
(boolean) @boolean
|
|
19
|
+
|
|
20
|
+
(comment) @comment
|
|
21
|
+
|
|
22
|
+
(string) @string
|
|
23
|
+
|
|
24
|
+
[
|
|
25
|
+
(integer)
|
|
26
|
+
(float)
|
|
27
|
+
] @number
|
|
28
|
+
|
|
29
|
+
[
|
|
30
|
+
(offset_date_time)
|
|
31
|
+
(local_date_time)
|
|
32
|
+
(local_date)
|
|
33
|
+
(local_time)
|
|
34
|
+
] @string.special
|
|
35
|
+
|
|
36
|
+
; Punctuation
|
|
37
|
+
;------------
|
|
38
|
+
|
|
39
|
+
[
|
|
40
|
+
"."
|
|
41
|
+
","
|
|
42
|
+
] @punctuation.delimiter
|
|
43
|
+
|
|
44
|
+
"=" @operator
|
|
45
|
+
|
|
46
|
+
[
|
|
47
|
+
"["
|
|
48
|
+
"]"
|
|
49
|
+
"[["
|
|
50
|
+
"]]"
|
|
51
|
+
"{"
|
|
52
|
+
"}"
|
|
53
|
+
] @punctuation.bracket
|
|
Binary file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
(boolean_scalar) @boolean
|
|
2
|
+
|
|
3
|
+
(null_scalar) @constant.builtin
|
|
4
|
+
|
|
5
|
+
[
|
|
6
|
+
(double_quote_scalar)
|
|
7
|
+
(single_quote_scalar)
|
|
8
|
+
(block_scalar)
|
|
9
|
+
(string_scalar)
|
|
10
|
+
] @string
|
|
11
|
+
|
|
12
|
+
[
|
|
13
|
+
(integer_scalar)
|
|
14
|
+
(float_scalar)
|
|
15
|
+
] @number
|
|
16
|
+
|
|
17
|
+
(comment) @comment
|
|
18
|
+
|
|
19
|
+
[
|
|
20
|
+
(anchor_name)
|
|
21
|
+
(alias_name)
|
|
22
|
+
] @label
|
|
23
|
+
|
|
24
|
+
(tag) @type
|
|
25
|
+
|
|
26
|
+
[
|
|
27
|
+
(yaml_directive)
|
|
28
|
+
(tag_directive)
|
|
29
|
+
(reserved_directive)
|
|
30
|
+
] @attribute
|
|
31
|
+
|
|
32
|
+
(block_mapping_pair
|
|
33
|
+
key: (flow_node
|
|
34
|
+
[
|
|
35
|
+
(double_quote_scalar)
|
|
36
|
+
(single_quote_scalar)
|
|
37
|
+
] @property))
|
|
38
|
+
|
|
39
|
+
(block_mapping_pair
|
|
40
|
+
key: (flow_node
|
|
41
|
+
(plain_scalar
|
|
42
|
+
(string_scalar) @property)))
|
|
43
|
+
|
|
44
|
+
(flow_mapping
|
|
45
|
+
(_
|
|
46
|
+
key: (flow_node
|
|
47
|
+
[
|
|
48
|
+
(double_quote_scalar)
|
|
49
|
+
(single_quote_scalar)
|
|
50
|
+
] @property)))
|
|
51
|
+
|
|
52
|
+
(flow_mapping
|
|
53
|
+
(_
|
|
54
|
+
key: (flow_node
|
|
55
|
+
(plain_scalar
|
|
56
|
+
(string_scalar) @property))))
|
|
57
|
+
|
|
58
|
+
[
|
|
59
|
+
","
|
|
60
|
+
"-"
|
|
61
|
+
":"
|
|
62
|
+
">"
|
|
63
|
+
"?"
|
|
64
|
+
"|"
|
|
65
|
+
] @punctuation.delimiter
|
|
66
|
+
|
|
67
|
+
[
|
|
68
|
+
"["
|
|
69
|
+
"]"
|
|
70
|
+
"{"
|
|
71
|
+
"}"
|
|
72
|
+
] @punctuation.bracket
|
|
73
|
+
|
|
74
|
+
[
|
|
75
|
+
"*"
|
|
76
|
+
"&"
|
|
77
|
+
"---"
|
|
78
|
+
"..."
|
|
79
|
+
] @punctuation.special
|
|
Binary file
|
package/docs/features/plugins.md
CHANGED
|
@@ -179,7 +179,7 @@ Header/footer item IDs passed to `set`/`clear` are scoped to the plugin and are
|
|
|
179
179
|
|
|
180
180
|
Use `kit.ui.text(text, style)` to style part or all of a contribution. Supported style fields are `fg`, `bg`, `bold`, `dim`, `italic`, `underline`, and `strikethrough`. Use `kit.ui.theme()` when setting or updating contributions to read the current resolved theme config (`name`, `tokens`, and `syntaxPalette`) and blend with Kit's colors. `onClick` is a whole-contribution action; Kit maps it to terminal mouse events and does not expose raw mouse events to plugins.
|
|
181
181
|
|
|
182
|
-
Built-in header item IDs are `HeaderBar:title`, `HeaderBar:model`,
|
|
182
|
+
Built-in header item IDs are `HeaderBar:title`, `HeaderBar:model`, and `HeaderBar:speech`.
|
|
183
183
|
|
|
184
184
|
Built-in internal plugins may use additional app-owned capabilities that are not part of the public plugin SDK. For example, built-ins can read VCS state while the public SDK only exposes chrome contribution rendering.
|
|
185
185
|
|