ts-wasms 1.0.6 → 2.0.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.
Files changed (247) hide show
  1. package/README.md +26 -9
  2. package/index.d.ts +102 -0
  3. package/index.js +27 -0
  4. package/out/angular/folds.scm +1 -0
  5. package/out/angular/highlights.scm +178 -0
  6. package/out/angular/indents.scm +16 -0
  7. package/out/angular/injections.scm +1 -0
  8. package/out/angular/locals.scm +1 -0
  9. package/out/angular/tree-sitter-angular.wasm +0 -0
  10. package/out/asm/highlights.scm +66 -0
  11. package/out/asm/injections.scm +5 -0
  12. package/out/asm/tree-sitter-asm.wasm +0 -0
  13. package/out/astro/folds.scm +1 -0
  14. package/out/astro/highlights.scm +12 -0
  15. package/out/astro/indents.scm +1 -0
  16. package/out/astro/injections.scm +27 -0
  17. package/out/astro/locals.scm +1 -0
  18. package/out/astro/tree-sitter-astro.wasm +0 -0
  19. package/out/bash/folds.scm +9 -0
  20. package/out/bash/indents.scm +32 -0
  21. package/out/bash/injections.scm +90 -0
  22. package/out/bash/locals.scm +14 -0
  23. package/out/c/folds.scm +23 -0
  24. package/out/c/indents.scm +99 -0
  25. package/out/c/injections.scm +128 -0
  26. package/out/c/locals.scm +67 -0
  27. package/out/clojure/folds.scm +2 -0
  28. package/out/clojure/injections.scm +2 -0
  29. package/out/clojure/locals.scm +1 -0
  30. package/out/cmake/folds.scm +8 -0
  31. package/out/cmake/highlights.scm +221 -0
  32. package/out/cmake/indents.scm +26 -0
  33. package/out/cmake/injections.scm +5 -0
  34. package/out/cmake/tree-sitter-cmake.wasm +0 -0
  35. package/out/comment/highlights.scm +49 -0
  36. package/out/comment/tree-sitter-comment.wasm +0 -0
  37. package/out/commonlisp/folds.scm +2 -0
  38. package/out/commonlisp/highlights.scm +314 -0
  39. package/out/commonlisp/injections.scm +5 -0
  40. package/out/commonlisp/locals.scm +109 -0
  41. package/out/cpp/folds.scm +14 -0
  42. package/out/cpp/indents.scm +8 -0
  43. package/out/cpp/locals.scm +78 -0
  44. package/out/css/folds.scm +10 -0
  45. package/out/css/indents.scm +11 -0
  46. package/out/css/injections.scm +2 -0
  47. package/out/csv/highlights.scm +5 -0
  48. package/out/csv/tree-sitter-csv.wasm +0 -0
  49. package/out/csv-psv/highlights.scm +5 -0
  50. package/out/csv-psv/tree-sitter-csv-psv.wasm +0 -0
  51. package/out/csv-tsv/highlights.scm +4 -0
  52. package/out/csv-tsv/tree-sitter-csv-tsv.wasm +0 -0
  53. package/out/dart/indents.scm +49 -0
  54. package/out/dart/injections.scm +2 -0
  55. package/out/dart/locals.scm +32 -0
  56. package/out/diff/folds.scm +5 -0
  57. package/out/diff/highlights.scm +49 -0
  58. package/out/diff/injections.scm +2 -0
  59. package/out/diff/tree-sitter-diff.wasm +0 -0
  60. package/out/dockerfile/highlights.scm +58 -0
  61. package/out/dockerfile/injections.scm +12 -0
  62. package/out/dockerfile/tree-sitter-dockerfile.wasm +0 -0
  63. package/out/dtd/folds.scm +4 -0
  64. package/out/dtd/highlights.scm +148 -0
  65. package/out/dtd/injections.scm +2 -0
  66. package/out/dtd/locals.scm +11 -0
  67. package/out/editorconfig/folds.scm +1 -0
  68. package/out/editorconfig/highlights.scm +35 -0
  69. package/out/editorconfig/injections.scm +2 -0
  70. package/out/editorconfig/tree-sitter-editorconfig.wasm +0 -0
  71. package/out/elixir/folds.scm +10 -0
  72. package/out/elixir/indents.scm +25 -0
  73. package/out/elixir/locals.scm +200 -0
  74. package/out/elm/folds.scm +14 -0
  75. package/out/erlang/folds.scm +9 -0
  76. package/out/erlang/injections.scm +2 -0
  77. package/out/fish/folds.scm +8 -0
  78. package/out/fish/highlights.scm +61 -0
  79. package/out/fish/indents.scm +18 -0
  80. package/out/fish/injections.scm +2 -0
  81. package/out/fish/locals.scm +19 -0
  82. package/out/fish/tree-sitter-fish.wasm +0 -0
  83. package/out/gdscript/folds.scm +26 -0
  84. package/out/gdscript/highlights.scm +635 -0
  85. package/out/gdscript/indents.scm +78 -0
  86. package/out/gdscript/injections.scm +2 -0
  87. package/out/gdscript/locals.scm +121 -0
  88. package/out/gdscript/tree-sitter-gdscript.wasm +0 -0
  89. package/out/gdshader/highlights.scm +256 -0
  90. package/out/gdshader/injections.scm +2 -0
  91. package/out/gdshader/locals.scm +24 -0
  92. package/out/gdshader/tags.scm +13 -0
  93. package/out/gdshader/tree-sitter-gdshader.wasm +0 -0
  94. package/out/git-config/highlights.scm +28 -0
  95. package/out/git-config/tree-sitter-git-config.wasm +0 -0
  96. package/out/git-rebase/highlights.scm +36 -0
  97. package/out/git-rebase/tree-sitter-git-rebase.wasm +0 -0
  98. package/out/gitattributes/highlights.scm +52 -0
  99. package/out/gitattributes/injections.scm +2 -0
  100. package/out/gitattributes/locals.scm +8 -0
  101. package/out/gitattributes/tree-sitter-gitattributes.wasm +0 -0
  102. package/out/gitignore/highlights.scm +36 -0
  103. package/out/gitignore/injections.scm +2 -0
  104. package/out/gitignore/tree-sitter-gitignore.wasm +0 -0
  105. package/out/go/folds.scm +19 -0
  106. package/out/go/indents.scm +48 -0
  107. package/out/go/injections.scm +42 -0
  108. package/out/go/locals.scm +88 -0
  109. package/out/godot-resource/tree-sitter-godot-resource.wasm +0 -0
  110. package/out/graphql/highlights.scm +163 -0
  111. package/out/graphql/indents.scm +11 -0
  112. package/out/graphql/injections.scm +2 -0
  113. package/out/groovy/folds.scm +6 -0
  114. package/out/groovy/highlights.scm +148 -0
  115. package/out/groovy/indents.scm +23 -0
  116. package/out/groovy/injections.scm +5 -0
  117. package/out/groovy/locals.scm +6 -0
  118. package/out/groovy/tree-sitter-groovy.wasm +0 -0
  119. package/out/haskell/folds.scm +6 -0
  120. package/out/hcl/folds.scm +6 -0
  121. package/out/hcl/highlights.scm +118 -0
  122. package/out/hcl/indents.scm +16 -0
  123. package/out/hcl/injections.scm +6 -0
  124. package/out/html/folds.scm +5 -0
  125. package/out/html/indents.scm +1 -0
  126. package/out/html/locals.scm +1 -0
  127. package/out/ini/folds.scm +1 -0
  128. package/out/ini/highlights.scm +16 -0
  129. package/out/ini/injections.scm +3 -0
  130. package/out/ini/tree-sitter-ini.wasm +0 -0
  131. package/out/java/folds.scm +8 -0
  132. package/out/java/indents.scm +40 -0
  133. package/out/java/injections.scm +31 -0
  134. package/out/java/locals.scm +100 -0
  135. package/out/javascript/folds.scm +1 -0
  136. package/out/javascript/indents.scm +1 -0
  137. package/out/json/folds.scm +5 -0
  138. package/out/json/indents.scm +11 -0
  139. package/out/json/injections.scm +2 -0
  140. package/out/json/locals.scm +4 -0
  141. package/out/julia/folds.scm +14 -0
  142. package/out/julia/indents.scm +52 -0
  143. package/out/kotlin/folds.scm +13 -0
  144. package/out/kotlin/injections.scm +52 -0
  145. package/out/kotlin/locals.scm +78 -0
  146. package/out/lua/folds.scm +12 -0
  147. package/out/lua/indents.scm +47 -0
  148. package/out/markdown/folds.scm +12 -0
  149. package/out/markdown/indents.scm +1 -0
  150. package/out/matlab/folds.scm +13 -0
  151. package/out/matlab/highlights.scm +218 -0
  152. package/out/matlab/indents.scm +40 -0
  153. package/out/matlab/injections.scm +2 -0
  154. package/out/matlab/locals.scm +33 -0
  155. package/out/matlab/tree-sitter-matlab.wasm +0 -0
  156. package/out/nim/folds.scm +41 -0
  157. package/out/nim/highlights.scm +186 -0
  158. package/out/nim/injections.scm +79 -0
  159. package/out/nim/locals.scm +328 -0
  160. package/out/nim/tree-sitter-nim.wasm +0 -0
  161. package/out/nix/folds.scm +11 -0
  162. package/out/nix/indents.scm +75 -0
  163. package/out/ocaml/folds.scm +30 -0
  164. package/out/ocaml/indents.scm +77 -0
  165. package/out/ocaml/injections.scm +2 -0
  166. package/out/php/folds.scm +1 -0
  167. package/out/php/indents.scm +1 -0
  168. package/out/php/locals.scm +1 -0
  169. package/out/prisma/folds.scm +7 -0
  170. package/out/prisma/injections.scm +5 -0
  171. package/out/python/folds.scm +28 -0
  172. package/out/python/indents.scm +213 -0
  173. package/out/python/injections.scm +30 -0
  174. package/out/python/locals.scm +124 -0
  175. package/out/qmljs/folds.scm +8 -0
  176. package/out/qmljs/highlights.scm +61 -0
  177. package/out/qmljs/injections.scm +1 -0
  178. package/out/qmljs/locals.scm +6 -0
  179. package/out/qmljs/tree-sitter-qmljs.wasm +0 -0
  180. package/out/query/folds.scm +6 -0
  181. package/out/query/highlights.scm +102 -0
  182. package/out/query/indents.scm +25 -0
  183. package/out/query/injections.scm +28 -0
  184. package/out/query/locals.scm +21 -0
  185. package/out/r/indents.scm +33 -0
  186. package/out/r/injections.scm +2 -0
  187. package/out/racket/folds.scm +2 -0
  188. package/out/racket/injections.scm +5 -0
  189. package/out/ruby/folds.scm +12 -0
  190. package/out/ruby/indents.scm +43 -0
  191. package/out/ruby/injections.scm +34 -0
  192. package/out/rust/folds.scm +25 -0
  193. package/out/rust/indents.scm +133 -0
  194. package/out/rust/locals.scm +98 -0
  195. package/out/scala/folds.scm +16 -0
  196. package/out/scala/injections.scm +5 -0
  197. package/out/scheme/folds.scm +2 -0
  198. package/out/scheme/injections.scm +2 -0
  199. package/out/scss/folds.scm +1 -0
  200. package/out/scss/indents.scm +7 -0
  201. package/out/scss/injections.scm +2 -0
  202. package/out/sql/folds.scm +1 -0
  203. package/out/sql/highlights.scm +445 -0
  204. package/out/sql/indents.scm +27 -0
  205. package/out/sql/injections.scm +5 -0
  206. package/out/sql/tree-sitter-sql.wasm +0 -0
  207. package/out/terraform/folds.scm +1 -0
  208. package/out/terraform/highlights.scm +41 -0
  209. package/out/terraform/indents.scm +1 -0
  210. package/out/terraform/injections.scm +1 -0
  211. package/out/toml/folds.scm +5 -0
  212. package/out/toml/indents.scm +11 -0
  213. package/out/toml/injections.scm +2 -0
  214. package/out/toml/locals.scm +4 -0
  215. package/out/tsx/folds.scm +1 -0
  216. package/out/tsx/indents.scm +1 -0
  217. package/out/tsx/injections.scm +1 -0
  218. package/out/typescript/folds.scm +8 -0
  219. package/out/typescript/indents.scm +7 -0
  220. package/out/typescript/injections.scm +28 -0
  221. package/out/vim/folds.scm +4 -0
  222. package/out/vim/highlights.scm +362 -0
  223. package/out/vim/injections.scm +44 -0
  224. package/out/vim/locals.scm +19 -0
  225. package/out/vim/tree-sitter-vim.wasm +0 -0
  226. package/out/vimdoc/highlights.scm +74 -0
  227. package/out/vimdoc/injections.scm +4 -0
  228. package/out/vue/folds.scm +6 -0
  229. package/out/vue/highlights.scm +54 -0
  230. package/out/vue/indents.scm +7 -0
  231. package/out/vue/injections.scm +78 -0
  232. package/out/vue/tree-sitter-vue.wasm +0 -0
  233. package/out/xml/folds.scm +5 -0
  234. package/out/xml/highlights.scm +198 -0
  235. package/out/xml/indents.scm +16 -0
  236. package/out/xml/injections.scm +32 -0
  237. package/out/xml/locals.scm +35 -0
  238. package/out/yaml/folds.scm +4 -0
  239. package/out/yaml/highlights.scm +79 -0
  240. package/out/yaml/indents.scm +7 -0
  241. package/out/yaml/injections.scm +81 -0
  242. package/out/yaml/locals.scm +9 -0
  243. package/out/yaml/tree-sitter-yaml.wasm +0 -0
  244. package/out/zig/locals.scm +96 -0
  245. package/package.json +61 -19
  246. package/out/clojurescript/highlights.scm +0 -29
  247. package/out/clojurescript/tree-sitter-clojurescript.wasm +0 -0
@@ -0,0 +1,314 @@
1
+ (sym_lit) @variable
2
+
3
+ ; A highlighting for functions/macros in th cl namespace is available in theHamsta/nvim-treesitter-commonlisp
4
+ ;(list_lit . (sym_lit) @function.builtin (#cl-standard-function? @function.builtin))
5
+ ;(list_lit . (sym_lit) @function.builtin (#cl-standard-macro? @function.macro))
6
+ (dis_expr) @comment
7
+
8
+ (defun_keyword) @function.macro
9
+
10
+ (defun_header
11
+ function_name: (_) @function)
12
+
13
+ (defun_header
14
+ lambda_list: (list_lit
15
+ (sym_lit) @variable.parameter))
16
+
17
+ (defun_header
18
+ keyword: (defun_keyword
19
+ "defmethod")
20
+ lambda_list: (list_lit
21
+ (list_lit
22
+ .
23
+ (sym_lit)
24
+ .
25
+ (sym_lit) @string.special.symbol)))
26
+
27
+ (defun_header
28
+ lambda_list: (list_lit
29
+ (list_lit
30
+ .
31
+ (sym_lit) @variable.parameter
32
+ .
33
+ (_))))
34
+
35
+ (defun_header
36
+ specifier: (sym_lit) @string.special.symbol)
37
+
38
+ [
39
+ ":"
40
+ "::"
41
+ "."
42
+ ] @punctuation.special
43
+
44
+ [
45
+ (accumulation_verb)
46
+ (for_clause_word)
47
+ "for"
48
+ "and"
49
+ "finally"
50
+ "thereis"
51
+ "always"
52
+ "when"
53
+ "if"
54
+ "unless"
55
+ "else"
56
+ "do"
57
+ "loop"
58
+ "below"
59
+ "in"
60
+ "from"
61
+ "across"
62
+ "repeat"
63
+ "being"
64
+ "into"
65
+ "with"
66
+ "as"
67
+ "while"
68
+ "until"
69
+ "return"
70
+ "initially"
71
+ ] @function.macro
72
+
73
+ "=" @operator
74
+
75
+ (include_reader_macro) @string.special.symbol
76
+
77
+ [
78
+ "#C"
79
+ "#c"
80
+ ] @number
81
+
82
+ [
83
+ (kwd_lit)
84
+ (self_referential_reader_macro)
85
+ ] @string.special.symbol
86
+
87
+ (package_lit
88
+ package: (_) @module)
89
+
90
+ "cl" @module
91
+
92
+ (str_lit) @string
93
+
94
+ (num_lit) @number
95
+
96
+ ((sym_lit) @boolean
97
+ (#any-of? @boolean "t" "T"))
98
+
99
+ (nil_lit) @constant.builtin
100
+
101
+ (comment) @comment @spell
102
+
103
+ ; dynamic variables
104
+ ((sym_lit) @variable.builtin
105
+ (#lua-match? @variable.builtin "^[*].+[*]$"))
106
+
107
+ ; quote
108
+ (format_specifier) @string.escape
109
+
110
+ (quoting_lit
111
+ "'" @string.escape)
112
+
113
+ (syn_quoting_lit
114
+ "`" @string.escape)
115
+
116
+ (unquoting_lit
117
+ "," @string.escape)
118
+
119
+ (unquote_splicing_lit
120
+ ",@" @string.escape)
121
+
122
+ [
123
+ "("
124
+ ")"
125
+ ] @punctuation.bracket
126
+
127
+ (block_comment) @comment @spell
128
+
129
+ (with_clause
130
+ type: (_) @type)
131
+
132
+ (for_clause
133
+ type: (_) @type)
134
+
135
+ ; defun-like things
136
+ (list_lit
137
+ .
138
+ (sym_lit) @function.macro
139
+ .
140
+ (sym_lit) @function
141
+ (#eq? @function.macro "deftest"))
142
+
143
+ ; Macros and Special Operators
144
+ (list_lit
145
+ .
146
+ (sym_lit) @function.macro
147
+ ; Generated via https://github.com/theHamsta/nvim-treesitter-commonlisp/blob/22fdc9fd6ed594176cc7299cc6f68dd21c94c63b/scripts/generate-symbols.lisp#L1-L21
148
+ (#any-of? @function.macro
149
+ "do*" "step" "handler-bind" "decf" "prog1" "destructuring-bind" "defconstant" "do" "lambda"
150
+ "with-standard-io-syntax" "case" "restart-bind" "ignore-errors" "with-slots" "prog2" "defclass"
151
+ "define-condition" "print-unreadable-object" "defvar" "when" "with-open-file" "prog" "incf"
152
+ "declaim" "and" "loop-finish" "multiple-value-bind" "pop" "psetf" "defmacro" "with-open-stream"
153
+ "define-modify-macro" "defsetf" "formatter" "call-method" "handler-case" "pushnew" "or"
154
+ "with-hash-table-iterator" "ecase" "cond" "defun" "remf" "ccase" "define-compiler-macro"
155
+ "dotimes" "multiple-value-list" "assert" "deftype" "with-accessors" "trace"
156
+ "with-simple-restart" "do-symbols" "nth-value" "define-symbol-macro" "psetq" "rotatef" "dolist"
157
+ "check-type" "multiple-value-setq" "push" "pprint-pop" "loop" "define-setf-expander"
158
+ "pprint-exit-if-list-exhausted" "with-condition-restarts" "defstruct" "with-input-from-string"
159
+ "with-compilation-unit" "defgeneric" "with-output-to-string" "untrace" "defparameter"
160
+ "ctypecase" "do-external-symbols" "etypecase" "do-all-symbols" "with-package-iterator" "unless"
161
+ "defmethod" "in-package" "defpackage" "return" "typecase" "shiftf" "setf" "pprint-logical-block"
162
+ "time" "restart-case" "prog*" "define-method-combination" "optimize"))
163
+
164
+ ; constant
165
+ ((sym_lit) @constant
166
+ (#lua-match? @constant "^[+].+[+]$"))
167
+
168
+ (var_quoting_lit
169
+ marker: "#'" @string.special.symbol
170
+ value: (_) @string.special.symbol)
171
+
172
+ [
173
+ "#"
174
+ "#p"
175
+ "#P"
176
+ ] @string.special.symbol
177
+
178
+ (list_lit
179
+ .
180
+ (sym_lit) @function.builtin
181
+ ; Generated via https://github.com/theHamsta/nvim-treesitter-commonlisp/blob/22fdc9fd6ed594176cc7299cc6f68dd21c94c63b/scripts/generate-symbols.lisp#L1-L21
182
+ (#any-of? @function.builtin
183
+ "apropos-list" "subst" "substitute" "pprint-linear" "file-namestring" "write-char" "do*"
184
+ "slot-exists-p" "file-author" "macro-function" "rassoc" "make-echo-stream"
185
+ "arithmetic-error-operation" "position-if-not" "list" "cdadr" "lisp-implementation-type"
186
+ "vector-push" "let" "length" "string-upcase" "adjoin" "digit-char" "step" "member-if"
187
+ "handler-bind" "lognot" "apply" "gcd" "slot-unbound" "stringp" "values-list" "stable-sort"
188
+ "decode-float" "make-list" "rplaca" "isqrt" "export" "synonym-stream-symbol" "function-keywords"
189
+ "replace" "tanh" "maphash" "code-char" "decf" "array-displacement" "string-not-lessp"
190
+ "slot-value" "remove-if" "cell-error-name" "vectorp" "cdddar" "two-way-stream-output-stream"
191
+ "parse-integer" "get-internal-real-time" "fourth" "make-string" "slot-missing" "byte-size"
192
+ "string-trim" "nstring-downcase" "cdaddr" "<" "labels" "interactive-stream-p" "fifth" "max"
193
+ "logxor" "pathname-name" "function" "realp" "eql" "logand" "short-site-name" "prog1"
194
+ "user-homedir-pathname" "list-all-packages" "exp" "cadar" "read-char-no-hang"
195
+ "package-error-package" "stream-external-format" "bit-andc2" "nsubstitute-if" "mapcar"
196
+ "complement" "load-logical-pathname-translations" "pprint-newline" "oddp" "caaar"
197
+ "destructuring-bind" "copy-alist" "acos" "go" "bit-nor" "defconstant" "fceiling" "tenth"
198
+ "nreverse" "=" "nunion" "slot-boundp" "string>" "count-if" "atom" "char=" "random-state-p"
199
+ "row-major-aref" "bit-andc1" "translate-pathname" "simple-vector-p" "coerce" "substitute-if-not"
200
+ "zerop" "invalid-method-error" "compile" "realpart" "remove-if-not" "pprint-tab"
201
+ "hash-table-rehash-threshold" "invoke-restart" "if" "count" "/=" "do" "initialize-instance"
202
+ "abs" "schar" "simple-condition-format-control" "delete-package" "subst-if" "lambda"
203
+ "hash-table-count" "array-has-fill-pointer-p" "bit" "with-standard-io-syntax" "parse-namestring"
204
+ "proclaim" "array-in-bounds-p" "multiple-value-call" "rplacd" "some" "graphic-char-p"
205
+ "read-from-string" "consp" "cadaar" "acons" "every" "make-pathname" "mask-field" "case"
206
+ "set-macro-character" "bit-and" "restart-bind" "echo-stream-input-stream" "compile-file"
207
+ "fill-pointer" "numberp" "acosh" "array-dimensions" "documentation" "minusp" "inspect"
208
+ "copy-structure" "integer-length" "ensure-generic-function" "char>=" "quote" "lognor"
209
+ "make-two-way-stream" "ignore-errors" "tailp" "with-slots" "fboundp"
210
+ "logical-pathname-translations" "equal" "float-sign" "shadow" "sleep" "numerator" "prog2" "getf"
211
+ "ldb-test" "round" "locally" "echo-stream-output-stream" "log" "get-macro-character"
212
+ "alphanumericp" "find-method" "nintersection" "defclass" "define-condition"
213
+ "print-unreadable-object" "defvar" "broadcast-stream-streams" "floatp" "subst-if-not" "integerp"
214
+ "translate-logical-pathname" "subsetp" "when" "write-string" "with-open-file" "clrhash"
215
+ "apropos" "intern" "min" "string-greaterp" "import" "nset-difference" "prog" "incf"
216
+ "both-case-p" "multiple-value-prog1" "characterp" "streamp" "digit-char-p" "random"
217
+ "string-lessp" "make-string-input-stream" "copy-symbol" "read-sequence" "logcount" "bit-not"
218
+ "boundp" "encode-universal-time" "third" "declaim" "map" "cons" "set-syntax-from-char" "and"
219
+ "cis" "symbol-plist" "loop-finish" "standard-char-p" "multiple-value-bind" "asin" "string" "pop"
220
+ "complex" "fdefinition" "psetf" "type-error-datum" "output-stream-p" "floor" "write-line" "<="
221
+ "defmacro" "rational" "hash-table-test" "with-open-stream" "read-char" "string-capitalize"
222
+ "get-properties" "y-or-n-p" "use-package" "remove" "compiler-macro-function" "read"
223
+ "package-nicknames" "remove-duplicates" "make-load-form-saving-slots" "dribble"
224
+ "define-modify-macro" "make-dispatch-macro-character" "close" "cosh" "open" "finish-output"
225
+ "string-downcase" "car" "nstring-capitalize" "software-type" "read-preserving-whitespace" "cadr"
226
+ "fround" "nsublis" "defsetf" "find-all-symbols" "char>" "no-applicable-method"
227
+ "compute-restarts" "pathname" "bit-orc2" "write-sequence" "pprint-tabular" "symbol-value"
228
+ "char-name" "get-decoded-time" "formatter" "bit-vector-p" "intersection" "pathname-type"
229
+ "clear-input" "call-method" "princ-to-string" "symbolp" "make-load-form" "nsubst"
230
+ "pprint-dispatch" "handler-case" "method-combination-error" "probe-file" "atan" "string<"
231
+ "type-error-expected-type" "pushnew" "unread-char" "print" "or" "with-hash-table-iterator"
232
+ "make-sequence" "ecase" "unwind-protect" "require" "sixth" "get-dispatch-macro-character"
233
+ "char-not-lessp" "read-byte" "tagbody" "file-error-pathname" "catch" "rationalp" "char-downcase"
234
+ "char-int" "array-rank" "cond" "last" "make-string-output-stream" "array-dimension"
235
+ "host-namestring" "input-stream-p" "decode-universal-time" "defun" "eval-when" "char-code"
236
+ "pathname-directory" "evenp" "subseq" "pprint" "ftruncate" "make-instance" "pathname-host"
237
+ "logbitp" "remf" "1+" "copy-pprint-dispatch" "char-upcase" "error" "read-line" "second"
238
+ "make-package" "directory" "special-operator-p" "open-stream-p" "rassoc-if-not" "ccase" "equalp"
239
+ "substitute-if" "*" "char/=" "cdr" "sqrt" "lcm" "logical-pathname" "eval"
240
+ "define-compiler-macro" "nsubstitute-if-not" "mapcon" "imagpart" "set-exclusive-or"
241
+ "simple-condition-format-arguments" "expt" "concatenate" "file-position" "macrolet" "keywordp"
242
+ "hash-table-rehash-size" "+" "eighth" "use-value" "char-equal" "bit-xor" "format" "byte"
243
+ "dotimes" "namestring" "char-not-equal" "multiple-value-list" "assert" "append" "notany" "typep"
244
+ "delete-file" "makunbound" "cdaar" "file-write-date" ">" "cdddr" "write-to-string" "funcall"
245
+ "member-if-not" "deftype" "readtable-case" "with-accessors" "truename" "constantp" "rassoc-if"
246
+ "caaadr" "tree-equal" "nset-exclusive-or" "nsubstitute" "make-instances-obsolete"
247
+ "package-use-list" "invoke-debugger" "provide" "count-if-not" "trace" "logandc1" "nthcdr"
248
+ "char<=" "functionp" "with-simple-restart" "set-dispatch-macro-character" "logorc2" "unexport"
249
+ "rest" "unbound-slot-instance" "make-hash-table" "hash-table-p" "reinitialize-instance" "nth"
250
+ "do-symbols" "nreconc" "macroexpand" "store-value" "float-precision" "remprop" "nth-value"
251
+ "define-symbol-macro" "update-instance-for-redefined-class" "identity" "progv" "progn"
252
+ "return-from" "readtablep" "rem" "symbol-name" "psetq" "wild-pathname-p" "char" "list*" "char<"
253
+ "plusp" "pairlis" "cddar" "pprint-indent" "union" "compiled-function-p" "rotatef" "abort"
254
+ "machine-type" "concatenated-stream-streams" "string-right-trim" "enough-namestring"
255
+ "arithmetic-error-operands" "ceiling" "dolist" "delete" "make-condition" "string-left-trim"
256
+ "integer-decode-float" "check-type" "notevery" "function-lambda-expression" "-"
257
+ "multiple-value-setq" "name-char" "push" "pprint-pop" "compile-file-pathname" "list-length"
258
+ "nstring-upcase" "eq" "find-if" "method-qualifiers" "caadr" "cddr" "string=" "let*"
259
+ "remove-method" "pathname-match-p" "find-package" "truncate" "caaddr" "get-setf-expansion"
260
+ "loop" "define-setf-expander" "caddr" "package-shadowing-symbols" "force-output"
261
+ "slot-makunbound" "string-not-greaterp" "cdadar" "cdaadr" "logandc2" "make-array"
262
+ "merge-pathnames" "sin" "1-" "machine-version" "ffloor" "packagep" "set-pprint-dispatch" "flet"
263
+ "gensym" "pprint-exit-if-list-exhausted" "cos" "get" "mapl" "delete-if"
264
+ "with-condition-restarts" "atanh" "copy-list" "fill" "char-not-greaterp" "bit-orc1" "mod"
265
+ "package-used-by-list" "warn" "add-method" "simple-string-p" "find-restart" "describe"
266
+ "pathname-version" "peek-char" "yes-or-no-p" "complexp" "aref" "not" "position-if" "string>="
267
+ "defstruct" "float-radix" "ninth" "caadar" "subtypep" "set" "butlast" "allocate-instance"
268
+ "with-input-from-string" "assoc" "write" "make-random-state" "bit-eqv" "float-digits"
269
+ "long-site-name" "with-compilation-unit" "delete-duplicates" "make-symbol" "room" "cdar"
270
+ "pprint-fill" "defgeneric" "macroexpand-1" "scale-float" "cdaaar"
271
+ "update-instance-for-different-class" "array-row-major-index" "ed" "file-string-length"
272
+ "ensure-directories-exist" "copy-readtable" "string<=" "seventh" "with-output-to-string"
273
+ "signum" "elt" "untrace" "null" "defparameter" "block" "prin1" "revappend" "gentemp" "ctypecase"
274
+ "ash" "sxhash" "listp" "do-external-symbols" "bit-ior" "etypecase" "sort" "change-class"
275
+ "find-class" "alpha-char-p" "map-into" "terpri" "do-all-symbols" "ldb" "logorc1" "search"
276
+ "fmakunbound" "load" "character" "string-not-equal" "pathnamep" "make-broadcast-stream" "arrayp"
277
+ "mapcan" "cerror" "invoke-restart-interactively" "assoc-if-not" "with-package-iterator"
278
+ "get-internal-run-time" "read-delimited-list" "unless" "lower-case-p" "restart-name" "/" "boole"
279
+ "defmethod" "float" "software-version" "vector-pop" "vector-push-extend" "caar" "ldiff" "member"
280
+ "find-symbol" "reduce" "svref" "describe-object" "logior" "string-equal" "type-of" "position"
281
+ "cddadr" "pathname-device" "get-output-stream-string" "symbol-package" "tan"
282
+ "compute-applicable-methods" "cddddr" "nsubst-if-not" "sublis" "set-difference"
283
+ "two-way-stream-input-stream" "adjustable-array-p" "machine-instance" "signal" "conjugate"
284
+ "caaaar" "endp" "lisp-implementation-version" "cddaar" "package-name" "adjust-array" "bit-nand"
285
+ "gethash" "in-package" "symbol-function" "make-concatenated-stream" "defpackage" "class-of"
286
+ "no-next-method" "logeqv" "deposit-field" "disassemble" "unuse-package" "copy-tree" "find"
287
+ "asinh" "class-name" "rename-file" "values" "print-not-readable-object" "mismatch" "cadadr"
288
+ "shadowing-import" "delete-if-not" "maplist" "listen" "return" "stream-element-type" "unintern"
289
+ "merge" "make-synonym-stream" "prin1-to-string" "nsubst-if" "byte-position" "phase"
290
+ "muffle-warning" "remhash" "continue" "load-time-value" "hash-table-size"
291
+ "upgraded-complex-part-type" "char-lessp" "sbit" "upgraded-array-element-type" "file-length"
292
+ "typecase" "cadddr" "first" "rationalize" "logtest" "find-if-not" "dpb" "mapc" "sinh"
293
+ "char-greaterp" "shiftf" "denominator" "get-universal-time" "nconc" "setf" "lognand"
294
+ "rename-package" "pprint-logical-block" "break" "symbol-macrolet" "the" "fresh-line"
295
+ "clear-output" "assoc-if" "string/=" "princ" "directory-namestring" "stream-error-stream"
296
+ "array-element-type" "setq" "copy-seq" "time" "restart-case" "prog*" "shared-initialize"
297
+ "array-total-size" "simple-bit-vector-p" "define-method-combination" "write-byte" "constantly"
298
+ "caddar" "print-object" "vector" "throw" "reverse" ">=" "upper-case-p" "nbutlast"))
299
+
300
+ (list_lit
301
+ .
302
+ (sym_lit) @operator
303
+ (#match? @operator "^([+*-+=<>]|<=|>=|/=)$"))
304
+
305
+ ((sym_lit) @string.special.symbol
306
+ (#lua-match? @string.special.symbol "^[&]"))
307
+
308
+ [
309
+ (array_dimension)
310
+ "#0A"
311
+ "#0a"
312
+ ] @number
313
+
314
+ (char_lit) @character
@@ -0,0 +1,5 @@
1
+ ([
2
+ (comment)
3
+ (block_comment)
4
+ ] @injection.content
5
+ (#set! injection.language "comment"))
@@ -0,0 +1,109 @@
1
+ (defun_header
2
+ function_name: (sym_lit) @local.definition.function
3
+ (#set! definition.function.scope "parent"))
4
+
5
+ (defun_header
6
+ lambda_list: (list_lit
7
+ (sym_lit) @local.definition.parameter))
8
+
9
+ (defun_header
10
+ keyword: (defun_keyword
11
+ "defmethod")
12
+ lambda_list: (list_lit
13
+ (list_lit
14
+ .
15
+ (sym_lit)
16
+ .
17
+ (sym_lit) @local.definition.type)))
18
+
19
+ (defun_header
20
+ lambda_list: (list_lit
21
+ (list_lit
22
+ .
23
+ (sym_lit) @local.definition.parameter
24
+ .
25
+ (_))))
26
+
27
+ (sym_lit) @local.reference
28
+
29
+ (defun) @local.scope
30
+
31
+ ((list_lit
32
+ .
33
+ (sym_lit) @_defvar
34
+ .
35
+ (sym_lit) @local.definition.var)
36
+ (#match? @_defvar "^(cl:)?(defvar|defparameter)$"))
37
+
38
+ (list_lit
39
+ .
40
+ (sym_lit) @_deftest
41
+ .
42
+ (sym_lit) @local.definition.function
43
+ (#eq? @_deftest "deftest")) @local.scope
44
+
45
+ (list_lit
46
+ .
47
+ (sym_lit) @_deftest
48
+ .
49
+ (sym_lit) @local.definition.function
50
+ (#eq? @_deftest "deftest")) @local.scope
51
+
52
+ (for_clause
53
+ .
54
+ (sym_lit) @local.definition.var)
55
+
56
+ (with_clause
57
+ .
58
+ (sym_lit) @local.definition.var)
59
+
60
+ (loop_macro) @local.scope
61
+
62
+ (list_lit
63
+ .
64
+ (sym_lit) @_let
65
+ (#match? @_let "(cl:|cffi:)?(with-accessors|with-foreign-objects|let[*]?)")
66
+ .
67
+ (list_lit
68
+ (list_lit
69
+ .
70
+ (sym_lit) @local.definition.var))) @local.scope
71
+
72
+ (list_lit
73
+ .
74
+ (sym_lit) @_let
75
+ (#match? @_let "(cl:|alexandria:)?(with-gensyms|dotimes|with-foreign-object)")
76
+ .
77
+ (list_lit
78
+ .
79
+ (sym_lit) @local.definition.var)) @local.scope
80
+
81
+ (list_lit
82
+ .
83
+ (kwd_lit) @_import_from
84
+ (#eq? @_import_from ":import-from")
85
+ .
86
+ (_)
87
+ (kwd_lit
88
+ (kwd_symbol) @local.definition.import))
89
+
90
+ (list_lit
91
+ .
92
+ (kwd_lit) @_import_from
93
+ (#eq? @_import_from ":import-from")
94
+ .
95
+ (_)
96
+ (sym_lit) @local.definition.import)
97
+
98
+ (list_lit
99
+ .
100
+ (kwd_lit) @_use
101
+ (#eq? @_use ":use")
102
+ (kwd_lit
103
+ (kwd_symbol) @local.definition.import))
104
+
105
+ (list_lit
106
+ .
107
+ (kwd_lit) @_use
108
+ (#eq? @_use ":use")
109
+ (sym_lit) @local.definition.import)
@@ -0,0 +1,14 @@
1
+ ; inherits: c
2
+
3
+ [
4
+ (for_range_loop)
5
+ (class_specifier)
6
+ (field_declaration
7
+ type: (enum_specifier)
8
+ default_value: (initializer_list))
9
+ (template_declaration)
10
+ (namespace_definition)
11
+ (try_statement)
12
+ (catch_clause)
13
+ (lambda_expression)
14
+ ] @fold
@@ -0,0 +1,8 @@
1
+ ; inherits: c
2
+
3
+ (condition_clause) @indent.begin
4
+
5
+ ((field_initializer_list) @indent.begin
6
+ (#set! indent.start_at_same_line 1))
7
+
8
+ (access_specifier) @indent.branch
@@ -0,0 +1,78 @@
1
+ ; inherits: c
2
+
3
+ ; Parameters
4
+ (variadic_parameter_declaration
5
+ declarator: (variadic_declarator
6
+ (identifier) @local.definition.parameter))
7
+
8
+ (optional_parameter_declaration
9
+ declarator: (identifier) @local.definition.parameter)
10
+
11
+ ; Class / struct definitions
12
+ (class_specifier) @local.scope
13
+
14
+ (reference_declarator
15
+ (identifier) @local.definition.var)
16
+
17
+ (variadic_declarator
18
+ (identifier) @local.definition.var)
19
+
20
+ (struct_specifier
21
+ name: (qualified_identifier
22
+ name: (type_identifier) @local.definition.type))
23
+
24
+ (class_specifier
25
+ name: (type_identifier) @local.definition.type)
26
+
27
+ (concept_definition
28
+ name: (identifier) @local.definition.type)
29
+
30
+ (class_specifier
31
+ name: (qualified_identifier
32
+ name: (type_identifier) @local.definition.type))
33
+
34
+ (alias_declaration
35
+ name: (type_identifier) @local.definition.type)
36
+
37
+ ;template <typename T>
38
+ (type_parameter_declaration
39
+ (type_identifier) @local.definition.type)
40
+
41
+ (template_declaration) @local.scope
42
+
43
+ ; Namespaces
44
+ (namespace_definition
45
+ name: (namespace_identifier) @local.definition.namespace
46
+ body: (_) @local.scope)
47
+
48
+ (namespace_definition
49
+ name: (nested_namespace_specifier) @local.definition.namespace
50
+ body: (_) @local.scope)
51
+
52
+ ((namespace_identifier) @local.reference
53
+ (#set! reference.kind "namespace"))
54
+
55
+ ; Function definitions
56
+ (template_function
57
+ name: (identifier) @local.definition.function) @local.scope
58
+
59
+ (template_method
60
+ name: (field_identifier) @local.definition.method) @local.scope
61
+
62
+ (function_declarator
63
+ declarator: (qualified_identifier
64
+ name: (identifier) @local.definition.function)) @local.scope
65
+
66
+ (field_declaration
67
+ declarator: (function_declarator
68
+ (field_identifier) @local.definition.method))
69
+
70
+ (lambda_expression) @local.scope
71
+
72
+ ; Control structures
73
+ (try_statement
74
+ body: (_) @local.scope)
75
+
76
+ (catch_clause) @local.scope
77
+
78
+ (requires_expression) @local.scope
@@ -0,0 +1,10 @@
1
+ [
2
+ ; top-level block statements from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js
3
+ ; note: (block) is not used due to unideal behavior when node before block node spans multiple lines
4
+ (rule_set)
5
+ (at_rule)
6
+ (supports_statement)
7
+ (media_statement)
8
+ (keyframe_block)
9
+ (import_statement)+
10
+ ] @fold
@@ -0,0 +1,11 @@
1
+ [
2
+ (block)
3
+ (declaration)
4
+ ] @indent.begin
5
+
6
+ (block
7
+ "}" @indent.branch)
8
+
9
+ "}" @indent.dedent
10
+
11
+ (comment) @indent.ignore
@@ -0,0 +1,2 @@
1
+ ((comment) @injection.content
2
+ (#set! injection.language "comment"))
@@ -0,0 +1,5 @@
1
+ (text) @string
2
+ (number) @number
3
+ (float) @float
4
+ (boolean) @boolean
5
+ "," @punctuation.delimiter
Binary file
@@ -0,0 +1,5 @@
1
+ (text) @string
2
+ (number) @number
3
+ (float) @float
4
+ (boolean) @boolean
5
+ "|" @punctuation.delimiter
@@ -0,0 +1,4 @@
1
+ (text) @string
2
+ (number) @number
3
+ (float) @float
4
+ (boolean) @boolean
@@ -0,0 +1,49 @@
1
+ [
2
+ (class_body)
3
+ (function_body)
4
+ (function_expression_body)
5
+ (declaration
6
+ (initializers))
7
+ (switch_block)
8
+ (formal_parameter_list)
9
+ (formal_parameter)
10
+ (list_literal)
11
+ (return_statement)
12
+ (arguments)
13
+ (try_statement)
14
+ ] @indent.begin
15
+
16
+ (switch_block
17
+ (_) @indent.begin
18
+ (#set! indent.immediate 1)
19
+ (#set! indent.start_at_same_line 1))
20
+
21
+ [
22
+ (switch_statement_case)
23
+ (switch_statement_default)
24
+ ] @indent.branch
25
+
26
+ [
27
+ "("
28
+ ")"
29
+ "{"
30
+ "}"
31
+ "["
32
+ "]"
33
+ ] @indent.branch
34
+
35
+ "}" @indent.end
36
+
37
+ (return_statement
38
+ ";" @indent.end)
39
+
40
+ (break_statement
41
+ ";" @indent.end)
42
+
43
+ (comment) @indent.ignore
44
+
45
+ ; dedenting the else block is painfully slow; replace with simpler strategy
46
+ ; (if_statement) @indent.begin
47
+ ; (if_statement
48
+ ; (block) @indent.branch)
49
+ (if_statement) @indent.auto
@@ -0,0 +1,2 @@
1
+ ((comment) @injection.content
2
+ (#set! injection.language "comment"))