@enjoys/context-engine 1.3.1 → 1.4.1

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 (221) hide show
  1. package/data/codeActions/angular.json +126 -0
  2. package/data/codeActions/nestjs.json +124 -0
  3. package/data/codeActions/nextjs.json +198 -0
  4. package/data/codeActions/react.json +154 -0
  5. package/data/codeActions/shadcn.json +112 -0
  6. package/data/codeActions/shell.json +169 -26
  7. package/data/codeLens/angular.json +22 -0
  8. package/data/codeLens/nestjs.json +21 -0
  9. package/data/codeLens/nextjs.json +117 -0
  10. package/data/codeLens/react.json +89 -0
  11. package/data/codeLens/shadcn.json +89 -0
  12. package/data/codeLens/shell.json +59 -17
  13. package/data/codeLens/tailwindcss.json +56 -0
  14. package/data/color/angular.json +21 -0
  15. package/data/color/nestjs.json +18 -0
  16. package/data/color/nextjs.json +22 -0
  17. package/data/color/react.json +93 -0
  18. package/data/color/shadcn.json +66 -0
  19. package/data/color/shell.json +106 -80
  20. package/data/commands/angular.json +312 -0
  21. package/data/commands/manifest.json +5 -0
  22. package/data/commands/nestjs.json +273 -0
  23. package/data/commands/nextjs.json +123 -0
  24. package/data/commands/react.json +210 -0
  25. package/data/commands/shadcn.json +410 -0
  26. package/data/commands/shell.json +571 -41
  27. package/data/completion/angular.json +1490 -0
  28. package/data/completion/css.json +793 -0
  29. package/data/completion/nestjs.json +1454 -0
  30. package/data/completion/nextjs.json +1373 -0
  31. package/data/completion/react.json +1319 -0
  32. package/data/completion/shadcn.json +1202 -0
  33. package/data/completion/shell.json +2446 -510
  34. package/data/declaration/angular.json +46 -0
  35. package/data/declaration/nestjs.json +47 -0
  36. package/data/declaration/nextjs.json +274 -0
  37. package/data/declaration/react.json +199 -0
  38. package/data/declaration/shadcn.json +211 -0
  39. package/data/declaration/shell.json +343 -24
  40. package/data/declaration/tailwindcss.json +72 -0
  41. package/data/definition/angular.json +670 -0
  42. package/data/definition/nestjs.json +684 -0
  43. package/data/definition/nextjs.json +439 -0
  44. package/data/definition/react.json +397 -0
  45. package/data/definition/shadcn.json +99 -0
  46. package/data/definition/shell.json +820 -0
  47. package/data/documentHighlight/angular.json +414 -0
  48. package/data/documentHighlight/css.json +77 -2
  49. package/data/documentHighlight/nestjs.json +115 -0
  50. package/data/documentHighlight/nextjs.json +212 -0
  51. package/data/documentHighlight/react.json +119 -0
  52. package/data/documentHighlight/shadcn.json +168 -0
  53. package/data/documentHighlight/shell.json +664 -334
  54. package/data/documentHighlight/tailwindcss.json +105 -10
  55. package/data/documentRangeFormatting/angular.json +45 -0
  56. package/data/documentRangeFormatting/nestjs.json +17 -0
  57. package/data/documentRangeFormatting/nextjs.json +17 -0
  58. package/data/documentRangeFormatting/react.json +78 -0
  59. package/data/documentRangeFormatting/shadcn.json +45 -0
  60. package/data/documentRangeFormatting/shell.json +120 -53
  61. package/data/documentSymbol/angular.json +180 -0
  62. package/data/documentSymbol/nestjs.json +152 -0
  63. package/data/documentSymbol/nextjs.json +159 -0
  64. package/data/documentSymbol/react.json +145 -0
  65. package/data/documentSymbol/shadcn.json +131 -0
  66. package/data/documentSymbol/shell.json +166 -26
  67. package/data/documentSymbol/tailwindcss.json +49 -0
  68. package/data/foldingRange/angular.json +99 -0
  69. package/data/foldingRange/nestjs.json +26 -0
  70. package/data/foldingRange/nextjs.json +26 -0
  71. package/data/foldingRange/react.json +120 -0
  72. package/data/foldingRange/shadcn.json +93 -0
  73. package/data/foldingRange/shell.json +106 -46
  74. package/data/formatting/angular.json +21 -0
  75. package/data/formatting/nestjs.json +23 -0
  76. package/data/formatting/nextjs.json +23 -0
  77. package/data/formatting/react.json +71 -0
  78. package/data/formatting/shadcn.json +61 -0
  79. package/data/formatting/shell.json +103 -19
  80. package/data/hover/angular.json +455 -0
  81. package/data/hover/css.json +232 -0
  82. package/data/hover/nestjs.json +296 -0
  83. package/data/hover/nextjs.json +305 -0
  84. package/data/hover/react.json +173 -0
  85. package/data/hover/shadcn.json +450 -0
  86. package/data/hover/shell.json +684 -75
  87. package/data/implementation/angular.json +22 -0
  88. package/data/implementation/nestjs.json +24 -0
  89. package/data/implementation/nextjs.json +137 -0
  90. package/data/implementation/react.json +125 -0
  91. package/data/implementation/shadcn.json +89 -0
  92. package/data/implementation/shell.json +59 -3
  93. package/data/inlayHints/angular.json +24 -0
  94. package/data/inlayHints/nestjs.json +24 -0
  95. package/data/inlayHints/nextjs.json +143 -0
  96. package/data/inlayHints/react.json +177 -0
  97. package/data/inlayHints/shadcn.json +109 -0
  98. package/data/inlayHints/shell.json +223 -35
  99. package/data/inlineCompletions/angular.json +135 -0
  100. package/data/inlineCompletions/nestjs.json +25 -0
  101. package/data/inlineCompletions/nextjs.json +179 -0
  102. package/data/inlineCompletions/react.json +203 -0
  103. package/data/inlineCompletions/shadcn.json +115 -0
  104. package/data/inlineCompletions/shell.json +185 -35
  105. package/data/linkedEditingRange/angular.json +23 -0
  106. package/data/linkedEditingRange/nestjs.json +10 -0
  107. package/data/linkedEditingRange/nextjs.json +11 -0
  108. package/data/linkedEditingRange/react.json +75 -0
  109. package/data/linkedEditingRange/shadcn.json +23 -0
  110. package/data/linkedEditingRange/shell.json +25 -25
  111. package/data/links/angular.json +95 -0
  112. package/data/links/nestjs.json +130 -0
  113. package/data/links/nextjs.json +91 -0
  114. package/data/links/react.json +75 -0
  115. package/data/links/shadcn.json +98 -0
  116. package/data/links/shell.json +56 -0
  117. package/data/links/tailwindcss.json +25 -0
  118. package/data/manifest.json +339 -152
  119. package/data/onTypeFormatting/angular.json +14 -0
  120. package/data/onTypeFormatting/nestjs.json +16 -0
  121. package/data/onTypeFormatting/nextjs.json +17 -0
  122. package/data/onTypeFormatting/react.json +127 -0
  123. package/data/onTypeFormatting/shadcn.json +54 -0
  124. package/data/onTypeFormatting/shell.json +72 -68
  125. package/data/rangeSemanticTokens/angular.json +140 -0
  126. package/data/rangeSemanticTokens/nestjs.json +27 -0
  127. package/data/rangeSemanticTokens/nextjs.json +28 -0
  128. package/data/rangeSemanticTokens/react.json +216 -0
  129. package/data/rangeSemanticTokens/shadcn.json +140 -0
  130. package/data/rangeSemanticTokens/shell.json +247 -69
  131. package/data/rangeSemanticTokens/tailwindcss.json +99 -8
  132. package/data/references/angular.json +26 -0
  133. package/data/references/nestjs.json +24 -0
  134. package/data/references/nextjs.json +178 -0
  135. package/data/references/react.json +192 -0
  136. package/data/references/shadcn.json +101 -0
  137. package/data/references/shell.json +323 -92
  138. package/data/references/tailwindcss.json +66 -0
  139. package/data/rename/angular.json +131 -0
  140. package/data/rename/nestjs.json +32 -0
  141. package/data/rename/nextjs.json +31 -0
  142. package/data/rename/react.json +88 -0
  143. package/data/rename/shadcn.json +79 -0
  144. package/data/rename/shell.json +101 -31
  145. package/data/selectionRange/angular.json +95 -0
  146. package/data/selectionRange/nestjs.json +21 -0
  147. package/data/selectionRange/nextjs.json +22 -0
  148. package/data/selectionRange/react.json +87 -0
  149. package/data/selectionRange/shadcn.json +89 -0
  150. package/data/selectionRange/shell.json +65 -35
  151. package/data/semanticTokens/angular.json +198 -0
  152. package/data/semanticTokens/nestjs.json +35 -0
  153. package/data/semanticTokens/nextjs.json +38 -0
  154. package/data/semanticTokens/react.json +215 -0
  155. package/data/semanticTokens/shadcn.json +180 -0
  156. package/data/semanticTokens/shell.json +238 -65
  157. package/data/signatureHelp/angular.json +182 -0
  158. package/data/signatureHelp/nestjs.json +128 -0
  159. package/data/signatureHelp/nextjs.json +127 -0
  160. package/data/signatureHelp/react.json +281 -0
  161. package/data/signatureHelp/shadcn.json +237 -0
  162. package/data/signatureHelp/shell.json +797 -104
  163. package/data/typeDefinition/angular.json +362 -0
  164. package/data/typeDefinition/nestjs.json +334 -0
  165. package/data/typeDefinition/nextjs.json +285 -0
  166. package/data/typeDefinition/react.json +236 -0
  167. package/data/typeDefinition/shadcn.json +292 -0
  168. package/data/typeDefinition/shell.json +104 -40
  169. package/package.json +1 -1
  170. package/data/codeActions/bash.json +0 -169
  171. package/data/codeActions/zsh.json +0 -49
  172. package/data/codeLens/bash.json +0 -75
  173. package/data/codeLens/zsh.json +0 -19
  174. package/data/color/bash.json +0 -100
  175. package/data/color/zsh.json +0 -80
  176. package/data/commands/bash.json +0 -102
  177. package/data/commands/zsh.json +0 -166
  178. package/data/completion/bash.json +0 -1184
  179. package/data/completion/zsh.json +0 -973
  180. package/data/declaration/bash.json +0 -301
  181. package/data/declaration/zsh.json +0 -205
  182. package/data/definition/bash.json +0 -565
  183. package/data/definition/zsh.json +0 -350
  184. package/data/documentHighlight/bash.json +0 -393
  185. package/data/documentHighlight/zsh.json +0 -266
  186. package/data/documentRangeFormatting/bash.json +0 -41
  187. package/data/documentRangeFormatting/zsh.json +0 -59
  188. package/data/documentSymbol/bash.json +0 -124
  189. package/data/documentSymbol/zsh.json +0 -26
  190. package/data/foldingRange/bash.json +0 -76
  191. package/data/foldingRange/zsh.json +0 -46
  192. package/data/formatting/bash.json +0 -88
  193. package/data/formatting/zsh.json +0 -28
  194. package/data/hover/bash.json +0 -579
  195. package/data/hover/zsh.json +0 -96
  196. package/data/implementation/bash.json +0 -44
  197. package/data/implementation/zsh.json +0 -41
  198. package/data/inlayHints/bash.json +0 -207
  199. package/data/inlayHints/zsh.json +0 -43
  200. package/data/inlineCompletions/bash.json +0 -155
  201. package/data/inlineCompletions/zsh.json +0 -17
  202. package/data/linkedEditingRange/bash.json +0 -25
  203. package/data/linkedEditingRange/zsh.json +0 -25
  204. package/data/links/bash.json +0 -56
  205. package/data/links/zsh.json +0 -15
  206. package/data/onTypeFormatting/bash.json +0 -68
  207. package/data/onTypeFormatting/zsh.json +0 -68
  208. package/data/rangeSemanticTokens/bash.json +0 -90
  209. package/data/rangeSemanticTokens/zsh.json +0 -76
  210. package/data/references/bash.json +0 -221
  211. package/data/references/zsh.json +0 -166
  212. package/data/rename/bash.json +0 -37
  213. package/data/rename/zsh.json +0 -31
  214. package/data/selectionRange/bash.json +0 -35
  215. package/data/selectionRange/zsh.json +0 -35
  216. package/data/semanticTokens/bash.json +0 -71
  217. package/data/semanticTokens/zsh.json +0 -71
  218. package/data/signatureHelp/bash.json +0 -111
  219. package/data/signatureHelp/zsh.json +0 -118
  220. package/data/typeDefinition/bash.json +0 -95
  221. package/data/typeDefinition/zsh.json +0 -40
@@ -0,0 +1,216 @@
1
+ {
2
+ "language": "react",
3
+ "rangeSemanticTokens": {
4
+ "rangeScope": "visible",
5
+ "tokenTypes": [
6
+ "namespace",
7
+ "type",
8
+ "class",
9
+ "enum",
10
+ "interface",
11
+ "struct",
12
+ "typeParameter",
13
+ "parameter",
14
+ "variable",
15
+ "property",
16
+ "enumMember",
17
+ "event",
18
+ "function",
19
+ "method",
20
+ "macro",
21
+ "keyword",
22
+ "modifier",
23
+ "comment",
24
+ "string",
25
+ "number",
26
+ "regexp",
27
+ "operator",
28
+ "decorator"
29
+ ],
30
+ "tokenModifiers": [
31
+ "declaration",
32
+ "definition",
33
+ "readonly",
34
+ "static",
35
+ "deprecated",
36
+ "async",
37
+ "modification",
38
+ "documentation",
39
+ "defaultLibrary",
40
+ "local"
41
+ ],
42
+ "semanticRules": [
43
+ {
44
+ "pattern": "(?:React|ReactDOM|ReactDOMServer)",
45
+ "tokenType": "namespace",
46
+ "tokenModifiers": ["defaultLibrary"],
47
+ "description": "React namespace identifiers"
48
+ },
49
+ {
50
+ "pattern": "(?:Component|PureComponent)",
51
+ "tokenType": "class",
52
+ "tokenModifiers": ["defaultLibrary"],
53
+ "description": "React base classes"
54
+ },
55
+ {
56
+ "pattern": "[A-Z][a-zA-Z0-9]*(?=\\s*(?:<[^>]*>)?\\s*(?:=\\s*(?:React\\.)?(?:memo|forwardRef|lazy)\\s*\\(|\\(|:\\s*React\\.FC))",
57
+ "tokenType": "function",
58
+ "tokenModifiers": ["declaration"],
59
+ "description": "React component declarations"
60
+ },
61
+ {
62
+ "pattern": "<([A-Z][a-zA-Z0-9.]*)",
63
+ "tokenType": "class",
64
+ "tokenModifiers": [],
65
+ "description": "JSX component tags in usage"
66
+ },
67
+ {
68
+ "pattern": "<([a-z][a-z0-9-]*)",
69
+ "tokenType": "keyword",
70
+ "tokenModifiers": [],
71
+ "description": "JSX HTML element tags"
72
+ },
73
+ {
74
+ "pattern": "use(?:State|Effect|Context|Reducer|Memo|Callback|Ref|Id|Transition|DeferredValue|SyncExternalStore|InsertionEffect|LayoutEffect|ImperativeHandle|DebugValue|OptimisticState|FormStatus|ActionState)",
75
+ "tokenType": "function",
76
+ "tokenModifiers": ["defaultLibrary"],
77
+ "description": "React built-in hooks"
78
+ },
79
+ {
80
+ "pattern": "use[A-Z][a-zA-Z0-9]*",
81
+ "tokenType": "function",
82
+ "tokenModifiers": [],
83
+ "description": "Custom hooks"
84
+ },
85
+ {
86
+ "pattern": "(?:className|style|key|ref|dangerouslySetInnerHTML|suppressHydrationWarning|suppressContentEditableWarning)(?=\\s*=)",
87
+ "tokenType": "property",
88
+ "tokenModifiers": ["defaultLibrary"],
89
+ "description": "React-specific JSX attributes"
90
+ },
91
+ {
92
+ "pattern": "(?:on[A-Z][a-zA-Z]*)(?=\\s*=)",
93
+ "tokenType": "event",
94
+ "tokenModifiers": [],
95
+ "description": "Event handler props"
96
+ },
97
+ {
98
+ "pattern": "(?:aria-[a-z-]+|data-[a-z-]+)(?=\\s*=)",
99
+ "tokenType": "property",
100
+ "tokenModifiers": [],
101
+ "description": "ARIA and data attributes"
102
+ },
103
+ {
104
+ "pattern": "(?:interface|type)\\s+([A-Z][a-zA-Z0-9]*(?:Props|State|Context|Config|Options|Params|Result|Data|Response|Payload))",
105
+ "tokenType": "interface",
106
+ "tokenModifiers": ["declaration"],
107
+ "description": "React-related type/interface declarations"
108
+ },
109
+ {
110
+ "pattern": "(?:React\\.)?(?:FC|FunctionComponent|ComponentType|ReactNode|ReactElement|JSX\\.Element|PropsWithChildren|HTMLAttributes|RefObject|MutableRefObject|Dispatch|SetStateAction|Context|Reducer|CSSProperties)",
111
+ "tokenType": "type",
112
+ "tokenModifiers": ["defaultLibrary"],
113
+ "description": "React built-in types"
114
+ },
115
+ {
116
+ "pattern": "(?:React\\.)?(?:ChangeEvent|FormEvent|MouseEvent|KeyboardEvent|FocusEvent|TouchEvent|PointerEvent|DragEvent|ClipboardEvent|AnimationEvent|TransitionEvent|SyntheticEvent)",
117
+ "tokenType": "type",
118
+ "tokenModifiers": ["defaultLibrary"],
119
+ "description": "React event types"
120
+ },
121
+ {
122
+ "pattern": "(?:Fragment|StrictMode|Suspense|Profiler)",
123
+ "tokenType": "class",
124
+ "tokenModifiers": ["defaultLibrary"],
125
+ "description": "React built-in components"
126
+ },
127
+ {
128
+ "pattern": "(?:createContext|createElement|cloneElement|createPortal|createRoot|hydrateRoot|forwardRef|memo|lazy|startTransition|flushSync|act)",
129
+ "tokenType": "function",
130
+ "tokenModifiers": ["defaultLibrary"],
131
+ "description": "React API functions"
132
+ },
133
+ {
134
+ "pattern": "handle[A-Z][a-zA-Z0-9]*",
135
+ "tokenType": "function",
136
+ "tokenModifiers": ["local"],
137
+ "description": "Event handler functions"
138
+ },
139
+ {
140
+ "pattern": "(?:render|componentDidMount|componentDidUpdate|componentWillUnmount|shouldComponentUpdate|getSnapshotBeforeUpdate|getDerivedStateFromProps|getDerivedStateFromError|componentDidCatch)",
141
+ "tokenType": "method",
142
+ "tokenModifiers": [],
143
+ "description": "React lifecycle methods"
144
+ },
145
+ {
146
+ "pattern": "(?:children|props|state|context|refs|defaultProps|displayName|propTypes|contextType|contextTypes)",
147
+ "tokenType": "property",
148
+ "tokenModifiers": ["defaultLibrary"],
149
+ "description": "React component properties"
150
+ },
151
+ {
152
+ "pattern": "(?:dispatch|setState|forceUpdate)",
153
+ "tokenType": "method",
154
+ "tokenModifiers": [],
155
+ "description": "State update methods"
156
+ },
157
+ {
158
+ "pattern": "(?:Children\\.map|Children\\.forEach|Children\\.count|Children\\.only|Children\\.toArray)",
159
+ "tokenType": "method",
160
+ "tokenModifiers": ["defaultLibrary"],
161
+ "description": "React.Children utility methods"
162
+ },
163
+ {
164
+ "pattern": "(?:isValidElement|cloneElement|createElement)",
165
+ "tokenType": "function",
166
+ "tokenModifiers": ["defaultLibrary"],
167
+ "description": "React element utility functions"
168
+ },
169
+ {
170
+ "pattern": "\\b(?:const|let|var)\\s+([A-Z_][A-Z0-9_]*)\\s*=",
171
+ "tokenType": "variable",
172
+ "tokenModifiers": ["readonly"],
173
+ "description": "Constant declarations (UPPER_CASE)"
174
+ }
175
+ ],
176
+ "legend": {
177
+ "tokenTypes": [
178
+ "namespace",
179
+ "type",
180
+ "class",
181
+ "enum",
182
+ "interface",
183
+ "struct",
184
+ "typeParameter",
185
+ "parameter",
186
+ "variable",
187
+ "property",
188
+ "enumMember",
189
+ "event",
190
+ "function",
191
+ "method",
192
+ "macro",
193
+ "keyword",
194
+ "modifier",
195
+ "comment",
196
+ "string",
197
+ "number",
198
+ "regexp",
199
+ "operator",
200
+ "decorator"
201
+ ],
202
+ "tokenModifiers": [
203
+ "declaration",
204
+ "definition",
205
+ "readonly",
206
+ "static",
207
+ "deprecated",
208
+ "async",
209
+ "modification",
210
+ "documentation",
211
+ "defaultLibrary",
212
+ "local"
213
+ ]
214
+ }
215
+ }
216
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "language": "shadcn",
3
+ "tokenTypes": [
4
+ "namespace",
5
+ "type",
6
+ "class",
7
+ "enum",
8
+ "interface",
9
+ "struct",
10
+ "typeParameter",
11
+ "parameter",
12
+ "variable",
13
+ "property",
14
+ "enumMember",
15
+ "event",
16
+ "function",
17
+ "method",
18
+ "macro",
19
+ "keyword",
20
+ "modifier",
21
+ "comment",
22
+ "string",
23
+ "number",
24
+ "regexp",
25
+ "operator",
26
+ "decorator"
27
+ ],
28
+ "tokenModifiers": [
29
+ "declaration",
30
+ "definition",
31
+ "readonly",
32
+ "static",
33
+ "deprecated",
34
+ "abstract",
35
+ "async",
36
+ "modification",
37
+ "documentation",
38
+ "defaultLibrary"
39
+ ],
40
+ "rangeTokenRules": [
41
+ {
42
+ "pattern": "<([A-Z][a-zA-Z0-9]*)[\\s\\S]*?(?:<\\/\\1>|\\/>)",
43
+ "tokenType": "class",
44
+ "tokenModifiers": ["defaultLibrary"],
45
+ "scope": "block",
46
+ "description": "Tokenize shadcn/ui component JSX blocks including children"
47
+ },
48
+ {
49
+ "pattern": "\\bcva\\s*\\([\\s\\S]*?\\)\\s*;?",
50
+ "tokenType": "function",
51
+ "tokenModifiers": ["defaultLibrary", "definition"],
52
+ "scope": "block",
53
+ "description": "Tokenize entire cva() definition blocks with base and variants"
54
+ },
55
+ {
56
+ "pattern": "^import\\s[\\s\\S]*?from\\s+[\"'][^\"']+[\"'];?$",
57
+ "tokenType": "namespace",
58
+ "tokenModifiers": [],
59
+ "scope": "line",
60
+ "description": "Tokenize import statement lines"
61
+ },
62
+ {
63
+ "pattern": "(?:function|const)\\s+([a-z][a-zA-Z0-9]*)\\s*(?:=\\s*(?:async\\s*)?\\([\\s\\S]*?\\)\\s*=>|\\([\\s\\S]*?\\))\\s*\\{[\\s\\S]*?\\}",
64
+ "tokenType": "function",
65
+ "tokenModifiers": ["definition"],
66
+ "scope": "block",
67
+ "description": "Tokenize utility function and custom hook definition blocks"
68
+ },
69
+ {
70
+ "pattern": "(?:const\\s+\\w+Schema|z\\.object)\\s*(?:=\\s*)?\\(?\\s*\\{[\\s\\S]*?\\}\\s*\\)?",
71
+ "tokenType": "variable",
72
+ "tokenModifiers": ["declaration", "readonly"],
73
+ "scope": "block",
74
+ "description": "Tokenize Zod form schema definition blocks"
75
+ },
76
+ {
77
+ "pattern": "(?:const\\s+)?columns\\s*(?::\\s*ColumnDef[^=]*)?=\\s*\\[[\\s\\S]*?\\]",
78
+ "tokenType": "variable",
79
+ "tokenModifiers": ["declaration", "readonly"],
80
+ "scope": "block",
81
+ "description": "Tokenize column definition array blocks for DataTable"
82
+ },
83
+ {
84
+ "pattern": "(?:interface|type)\\s+[A-Z][a-zA-Z0-9]*(?:<[^>]*>)?\\s*(?:=\\s*)?\\{[\\s\\S]*?\\}",
85
+ "tokenType": "interface",
86
+ "tokenModifiers": ["declaration"],
87
+ "scope": "block",
88
+ "description": "Tokenize TypeScript interface and type definition blocks"
89
+ },
90
+ {
91
+ "pattern": "className\\s*=\\s*\\{?\\s*cn\\([\\s\\S]*?\\)\\s*\\}?",
92
+ "tokenType": "function",
93
+ "tokenModifiers": ["defaultLibrary"],
94
+ "scope": "line",
95
+ "description": "Tokenize className expressions using cn() utility"
96
+ },
97
+ {
98
+ "pattern": "variants\\s*:\\s*\\{[\\s\\S]*?\\}(?=\\s*[,}])",
99
+ "tokenType": "property",
100
+ "tokenModifiers": ["definition"],
101
+ "scope": "block",
102
+ "description": "Tokenize variant objects within cva configuration"
103
+ },
104
+ {
105
+ "pattern": "(?<=<[A-Z][a-zA-Z0-9]*)\\s+[a-zA-Z][a-zA-Z0-9]*\\s*=\\s*(?:\\{[^}]*\\}|\"[^\"]*\"|'[^']*')",
106
+ "tokenType": "property",
107
+ "tokenModifiers": [],
108
+ "scope": "line",
109
+ "description": "Tokenize JSX attribute assignments on components"
110
+ },
111
+ {
112
+ "pattern": "React\\.forwardRef\\s*(?:<[^>]*>)?\\s*\\([\\s\\S]*?\\)\\s*;?",
113
+ "tokenType": "function",
114
+ "tokenModifiers": ["defaultLibrary", "definition"],
115
+ "scope": "block",
116
+ "description": "Tokenize React.forwardRef wrapper blocks"
117
+ },
118
+ {
119
+ "pattern": "\\b(?:describe|it|test)\\s*\\([\\s\\S]*?\\}\\s*\\)",
120
+ "tokenType": "function",
121
+ "tokenModifiers": [],
122
+ "scope": "block",
123
+ "description": "Tokenize test describe/it/test blocks"
124
+ },
125
+ {
126
+ "pattern": "<FormField[\\s\\S]*?(?:<\\/FormField>|\\/>)",
127
+ "tokenType": "class",
128
+ "tokenModifiers": ["defaultLibrary"],
129
+ "scope": "block",
130
+ "description": "Tokenize FormField component blocks with render props"
131
+ },
132
+ {
133
+ "pattern": "(?:function|const)\\s+([A-Z][a-zA-Z0-9]*)\\s*(?:=\\s*(?:React\\.forwardRef|\\()|\\()[\\s\\S]*?(?:^\\}\\s*\\)?\\s*;?$)",
134
+ "tokenType": "class",
135
+ "tokenModifiers": ["declaration", "definition"],
136
+ "scope": "block",
137
+ "description": "Tokenize full component definition blocks"
138
+ }
139
+ ]
140
+ }
@@ -1,69 +1,247 @@
1
- {
2
- "language": "shell",
3
- "tokenTypes": ["namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator"],
4
- "tokenModifiers": ["declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary"],
5
- "tokenLegend": {
6
- "tokenTypes": ["variable", "parameter", "function", "keyword", "comment", "string", "number", "operator"],
7
- "tokenModifiers": ["declaration", "definition", "readonly", "defaultLibrary"]
8
- },
9
- "rangeTokenRules": [
10
- {
11
- "type": "function",
12
- "pattern": "\\bfunction\\s+[a-zA-Z_][a-zA-Z0-9_]*|[a-zA-Z_][a-zA-Z0-9_]*\\s*\\(\\)",
13
- "modifiers": ["declaration"],
14
- "description": "Function declarations",
15
- "rangeScope": "declaration"
16
- },
17
- {
18
- "type": "variable",
19
- "pattern": "\\$\\{?[a-zA-Z_][a-zA-Z0-9_]*\\}?",
20
- "modifiers": [],
21
- "description": "Variable references with $",
22
- "rangeScope": "expression"
23
- },
24
- {
25
- "type": "variable",
26
- "pattern": "\\b[a-zA-Z_][a-zA-Z0-9_]*=",
27
- "modifiers": ["declaration"],
28
- "description": "Variable assignments",
29
- "rangeScope": "statement"
30
- },
31
- {
32
- "type": "keyword",
33
- "pattern": "\\bif\\s+.*?;\\s*then",
34
- "modifiers": [],
35
- "description": "If conditional blocks",
36
- "rangeScope": "block"
37
- },
38
- {
39
- "type": "keyword",
40
- "pattern": "\\bwhile\\s+.*?;\\s*do",
41
- "modifiers": [],
42
- "description": "While loop blocks",
43
- "rangeScope": "block"
44
- },
45
- {
46
- "type": "keyword",
47
- "pattern": "\\bfor\\s+[a-zA-Z_][a-zA-Z0-9_]*\\s+in\\b",
48
- "modifiers": [],
49
- "description": "For loop blocks",
50
- "rangeScope": "block"
51
- },
52
- {
53
- "type": "operator",
54
- "pattern": "[a-zA-Z0-9_]+\\s*\\|\\s*[a-zA-Z0-9_]+",
55
- "modifiers": [],
56
- "description": "Pipeline expressions",
57
- "rangeScope": "expression"
58
- },
59
- {
60
- "type": "keyword",
61
- "pattern": "\\bcase\\s+.*?\\s+in",
62
- "modifiers": [],
63
- "description": "Case statement blocks",
64
- "rangeScope": "block"
65
- }
66
- ],
67
- "supportedRangeScopes": ["statement", "block", "expression", "declaration"],
68
- "multilineTokens": ["comment", "string"]
69
- }
1
+ {
2
+ "language": "shell",
3
+ "tokenTypes": [
4
+ "namespace",
5
+ "type",
6
+ "class",
7
+ "enum",
8
+ "interface",
9
+ "struct",
10
+ "typeParameter",
11
+ "parameter",
12
+ "variable",
13
+ "property",
14
+ "enumMember",
15
+ "event",
16
+ "function",
17
+ "method",
18
+ "macro",
19
+ "keyword",
20
+ "modifier",
21
+ "comment",
22
+ "string",
23
+ "number",
24
+ "regexp",
25
+ "operator",
26
+ "decorator"
27
+ ],
28
+ "tokenModifiers": [
29
+ "declaration",
30
+ "definition",
31
+ "readonly",
32
+ "static",
33
+ "deprecated",
34
+ "abstract",
35
+ "async",
36
+ "modification",
37
+ "documentation",
38
+ "defaultLibrary"
39
+ ],
40
+ "tokenLegend": {
41
+ "tokenTypes": [
42
+ "variable",
43
+ "parameter",
44
+ "function",
45
+ "keyword",
46
+ "comment",
47
+ "string",
48
+ "number",
49
+ "operator"
50
+ ],
51
+ "tokenModifiers": [
52
+ "declaration",
53
+ "definition",
54
+ "readonly",
55
+ "defaultLibrary",
56
+ "modification"
57
+ ]
58
+ },
59
+ "rangeTokenRules": [
60
+ {
61
+ "type": "function",
62
+ "pattern": "\\bfunction\\s+[a-zA-Z_][a-zA-Z0-9_]*|[a-zA-Z_][a-zA-Z0-9_]*\\s*\\(\\)",
63
+ "modifiers": [
64
+ "declaration"
65
+ ],
66
+ "description": "Function declarations",
67
+ "rangeScope": "declaration"
68
+ },
69
+ {
70
+ "type": "variable",
71
+ "pattern": "\\$\\{?[a-zA-Z_][a-zA-Z0-9_]*\\}?",
72
+ "modifiers": [],
73
+ "description": "Variable references with $",
74
+ "rangeScope": "expression"
75
+ },
76
+ {
77
+ "type": "variable",
78
+ "pattern": "\\b[a-zA-Z_][a-zA-Z0-9_]*=",
79
+ "modifiers": [
80
+ "declaration"
81
+ ],
82
+ "description": "Variable assignments",
83
+ "rangeScope": "statement"
84
+ },
85
+ {
86
+ "type": "keyword",
87
+ "pattern": "\\bif\\s+.*?;\\s*then",
88
+ "modifiers": [],
89
+ "description": "If conditional blocks",
90
+ "rangeScope": "block"
91
+ },
92
+ {
93
+ "type": "keyword",
94
+ "pattern": "\\bwhile\\s+.*?;\\s*do",
95
+ "modifiers": [],
96
+ "description": "While loop blocks",
97
+ "rangeScope": "block"
98
+ },
99
+ {
100
+ "type": "keyword",
101
+ "pattern": "\\bfor\\s+[a-zA-Z_][a-zA-Z0-9_]*\\s+in\\b",
102
+ "modifiers": [],
103
+ "description": "For loop blocks",
104
+ "rangeScope": "block"
105
+ },
106
+ {
107
+ "type": "operator",
108
+ "pattern": "[a-zA-Z0-9_]+\\s*\\|\\s*[a-zA-Z0-9_]+",
109
+ "modifiers": [],
110
+ "description": "Pipeline expressions",
111
+ "rangeScope": "expression"
112
+ },
113
+ {
114
+ "type": "keyword",
115
+ "pattern": "\\bcase\\s+.*?\\s+in",
116
+ "modifiers": [],
117
+ "description": "Case statement blocks",
118
+ "rangeScope": "block"
119
+ },
120
+ {
121
+ "type": "function",
122
+ "pattern": "\\b\\w+\\s*\\(\\)\\s*\\{[\\s\\S]*?\\}",
123
+ "modifiers": [
124
+ "definition"
125
+ ],
126
+ "description": "Function body definitions",
127
+ "rangeScope": "block"
128
+ },
129
+ {
130
+ "type": "variable",
131
+ "pattern": "\\$\\{[^}]+\\}|\\$[A-Za-z_][A-Za-z0-9_]*",
132
+ "modifiers": [],
133
+ "description": "Variable expansion expressions",
134
+ "rangeScope": "expression"
135
+ },
136
+ {
137
+ "type": "keyword",
138
+ "pattern": "\\bif\\b[\\s\\S]*?\\bfi\\b",
139
+ "modifiers": [],
140
+ "description": "If/fi conditional blocks",
141
+ "rangeScope": "block"
142
+ },
143
+ {
144
+ "type": "keyword",
145
+ "pattern": "\\bwhile\\b[\\s\\S]*?\\bdone\\b",
146
+ "modifiers": [],
147
+ "description": "While loop blocks",
148
+ "rangeScope": "block"
149
+ },
150
+ {
151
+ "type": "keyword",
152
+ "pattern": "\\bfor\\b[\\s\\S]*?\\bdone\\b",
153
+ "modifiers": [],
154
+ "description": "For loop blocks",
155
+ "rangeScope": "block"
156
+ },
157
+ {
158
+ "type": "keyword",
159
+ "pattern": "\\bcase\\b[\\s\\S]*?\\besac\\b",
160
+ "modifiers": [],
161
+ "description": "Case/esac switch blocks",
162
+ "rangeScope": "block"
163
+ },
164
+ {
165
+ "type": "variable",
166
+ "pattern": "\\b[A-Za-z_][A-Za-z0-9_]*=",
167
+ "modifiers": [
168
+ "declaration"
169
+ ],
170
+ "description": "Variable assignment statements",
171
+ "rangeScope": "statement"
172
+ },
173
+ {
174
+ "type": "variable",
175
+ "pattern": "\\breadonly\\s+\\w+=",
176
+ "modifiers": [
177
+ "declaration",
178
+ "readonly"
179
+ ],
180
+ "description": "Readonly variable declarations",
181
+ "rangeScope": "statement"
182
+ },
183
+ {
184
+ "type": "string",
185
+ "pattern": "\\$\\([^)]+\\)|`[^`]+`",
186
+ "modifiers": [],
187
+ "description": "Command substitution expressions",
188
+ "rangeScope": "expression"
189
+ },
190
+ {
191
+ "type": "comment",
192
+ "pattern": "#.*$",
193
+ "modifiers": [],
194
+ "description": "Line comments",
195
+ "rangeScope": "statement"
196
+ },
197
+ {
198
+ "type": "string",
199
+ "pattern": "<<-?\\s*'?\\w+'?[\\s\\S]*?^\\w+$",
200
+ "modifiers": [],
201
+ "description": "Here-document strings",
202
+ "rangeScope": "expression"
203
+ },
204
+ {
205
+ "type": "variable",
206
+ "pattern": "\\b(local|typeset|declare|integer|float)\\s+[a-zA-Z_][a-zA-Z0-9_]*",
207
+ "modifiers": [
208
+ "declaration"
209
+ ],
210
+ "description": "Typed variable declarations",
211
+ "rangeScope": "statement"
212
+ },
213
+ {
214
+ "type": "keyword",
215
+ "pattern": "\\b(autoload|zmodload|compdef|zstyle|bindkey)\\b",
216
+ "modifiers": [
217
+ "defaultLibrary"
218
+ ],
219
+ "description": "Zsh builtin command statements",
220
+ "rangeScope": "statement"
221
+ },
222
+ {
223
+ "type": "operator",
224
+ "pattern": "\\(#[a-zA-Z]\\)",
225
+ "modifiers": [],
226
+ "description": "Glob qualifier expressions",
227
+ "rangeScope": "expression"
228
+ },
229
+ {
230
+ "type": "variable",
231
+ "pattern": "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*(#|%|/|:|\\^|\\+)[^}]*\\}",
232
+ "modifiers": [],
233
+ "description": "Parameter expansion expressions",
234
+ "rangeScope": "expression"
235
+ }
236
+ ],
237
+ "supportedRangeScopes": [
238
+ "statement",
239
+ "block",
240
+ "expression",
241
+ "declaration"
242
+ ],
243
+ "multilineTokens": [
244
+ "comment",
245
+ "string"
246
+ ]
247
+ }