@kmugalkhod/lightcode 0.7.1 → 0.8.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/README.md +119 -119
- package/assets/grammars/c/highlights.scm +341 -0
- package/assets/grammars/c/tree-sitter-c.wasm +0 -0
- package/assets/grammars/cpp/highlights.scm +74 -0
- package/assets/grammars/cpp/tree-sitter-cpp.wasm +0 -0
- package/assets/grammars/css/highlights.scm +109 -0
- package/assets/grammars/css/tree-sitter-css.wasm +0 -0
- package/assets/grammars/go/highlights.scm +123 -0
- package/assets/grammars/go/tree-sitter-go.wasm +0 -0
- package/assets/grammars/html/highlights.scm +7 -0
- package/assets/grammars/html/tree-sitter-html.wasm +0 -0
- package/assets/grammars/json/highlights.scm +38 -0
- package/assets/grammars/json/tree-sitter-json.wasm +0 -0
- package/assets/grammars/python/highlights.scm +443 -0
- package/assets/grammars/python/tree-sitter-python.wasm +0 -0
- package/assets/grammars/rust/highlights.scm +159 -0
- package/assets/grammars/rust/tree-sitter-rust.wasm +0 -0
- package/assets/grammars/yaml/highlights.scm +99 -0
- package/assets/grammars/yaml/tree-sitter-yaml.wasm +0 -0
- package/cli.js +3378 -1032
- package/package.json +2 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
[
|
|
2
|
+
"@media"
|
|
3
|
+
"@charset"
|
|
4
|
+
"@namespace"
|
|
5
|
+
"@supports"
|
|
6
|
+
"@keyframes"
|
|
7
|
+
(at_keyword)
|
|
8
|
+
] @keyword.directive
|
|
9
|
+
|
|
10
|
+
"@import" @keyword.import
|
|
11
|
+
|
|
12
|
+
[
|
|
13
|
+
(to)
|
|
14
|
+
(from)
|
|
15
|
+
] @keyword
|
|
16
|
+
|
|
17
|
+
(comment) @comment @spell
|
|
18
|
+
|
|
19
|
+
(tag_name) @tag
|
|
20
|
+
|
|
21
|
+
(class_name) @type
|
|
22
|
+
|
|
23
|
+
(id_name) @constant
|
|
24
|
+
|
|
25
|
+
[
|
|
26
|
+
(property_name)
|
|
27
|
+
(feature_name)
|
|
28
|
+
] @property
|
|
29
|
+
|
|
30
|
+
[
|
|
31
|
+
(nesting_selector)
|
|
32
|
+
(universal_selector)
|
|
33
|
+
] @character.special
|
|
34
|
+
|
|
35
|
+
(function_name) @function
|
|
36
|
+
|
|
37
|
+
[
|
|
38
|
+
"~"
|
|
39
|
+
">"
|
|
40
|
+
"+"
|
|
41
|
+
"-"
|
|
42
|
+
"*"
|
|
43
|
+
"/"
|
|
44
|
+
"="
|
|
45
|
+
"^="
|
|
46
|
+
"|="
|
|
47
|
+
"~="
|
|
48
|
+
"$="
|
|
49
|
+
"*="
|
|
50
|
+
] @operator
|
|
51
|
+
|
|
52
|
+
[
|
|
53
|
+
"and"
|
|
54
|
+
"or"
|
|
55
|
+
"not"
|
|
56
|
+
"only"
|
|
57
|
+
] @keyword.operator
|
|
58
|
+
|
|
59
|
+
(important) @keyword.modifier
|
|
60
|
+
|
|
61
|
+
(attribute_selector
|
|
62
|
+
(plain_value) @string)
|
|
63
|
+
|
|
64
|
+
(pseudo_element_selector
|
|
65
|
+
"::"
|
|
66
|
+
(tag_name) @attribute)
|
|
67
|
+
|
|
68
|
+
(pseudo_class_selector
|
|
69
|
+
(class_name) @attribute)
|
|
70
|
+
|
|
71
|
+
(attribute_name) @tag.attribute
|
|
72
|
+
|
|
73
|
+
(namespace_name) @module
|
|
74
|
+
|
|
75
|
+
(keyframes_name) @variable
|
|
76
|
+
|
|
77
|
+
((property_name) @variable
|
|
78
|
+
(#lua-match? @variable "^[-][-]"))
|
|
79
|
+
|
|
80
|
+
((plain_value) @variable
|
|
81
|
+
(#lua-match? @variable "^[-][-]"))
|
|
82
|
+
|
|
83
|
+
[
|
|
84
|
+
(string_value)
|
|
85
|
+
(color_value)
|
|
86
|
+
(unit)
|
|
87
|
+
] @string
|
|
88
|
+
|
|
89
|
+
(integer_value) @number
|
|
90
|
+
|
|
91
|
+
(float_value) @number.float
|
|
92
|
+
|
|
93
|
+
[
|
|
94
|
+
"#"
|
|
95
|
+
","
|
|
96
|
+
"."
|
|
97
|
+
":"
|
|
98
|
+
"::"
|
|
99
|
+
";"
|
|
100
|
+
] @punctuation.delimiter
|
|
101
|
+
|
|
102
|
+
[
|
|
103
|
+
"{"
|
|
104
|
+
")"
|
|
105
|
+
"("
|
|
106
|
+
"}"
|
|
107
|
+
"["
|
|
108
|
+
"]"
|
|
109
|
+
] @punctuation.bracket
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
; Function calls
|
|
2
|
+
|
|
3
|
+
(call_expression
|
|
4
|
+
function: (identifier) @function.builtin
|
|
5
|
+
(.match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))
|
|
6
|
+
|
|
7
|
+
(call_expression
|
|
8
|
+
function: (identifier) @function)
|
|
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
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
(true)
|
|
3
|
+
(false)
|
|
4
|
+
] @boolean
|
|
5
|
+
|
|
6
|
+
(null) @constant.builtin
|
|
7
|
+
|
|
8
|
+
(number) @number
|
|
9
|
+
|
|
10
|
+
(pair
|
|
11
|
+
key: (string) @property)
|
|
12
|
+
|
|
13
|
+
(pair
|
|
14
|
+
value: (string) @string)
|
|
15
|
+
|
|
16
|
+
(array
|
|
17
|
+
(string) @string)
|
|
18
|
+
|
|
19
|
+
[
|
|
20
|
+
","
|
|
21
|
+
":"
|
|
22
|
+
] @punctuation.delimiter
|
|
23
|
+
|
|
24
|
+
[
|
|
25
|
+
"["
|
|
26
|
+
"]"
|
|
27
|
+
"{"
|
|
28
|
+
"}"
|
|
29
|
+
] @punctuation.bracket
|
|
30
|
+
|
|
31
|
+
("\"" @conceal
|
|
32
|
+
(#set! conceal ""))
|
|
33
|
+
|
|
34
|
+
(escape_sequence) @string.escape
|
|
35
|
+
|
|
36
|
+
((escape_sequence) @conceal
|
|
37
|
+
(#eq? @conceal "\\\"")
|
|
38
|
+
(#set! conceal "\""))
|
|
Binary file
|