@@ -150,61 +150,61 @@ export async function activate(context: ExtensionContext) {
150
150
} )
151
151
)
152
152
153
- context . subscriptions . push (
154
- commands . registerCommand (
155
- 'tailwindCSS.onInsertArbitraryVariantSnippet' ,
156
- (
157
- variantName : string ,
158
- range : {
159
- start : { line : number ; character : number }
160
- end : { line : number ; character : number }
161
- }
162
- ) => {
163
- let listener = Window . onDidChangeTextEditorSelection ( ( event ) => {
164
- if ( event . selections . length !== 1 ) {
165
- listener . dispose ( )
166
- return
167
- }
168
-
169
- let document = event . textEditor . document
170
- let selection = event . selections [ 0 ]
171
-
172
- let line = document . lineAt ( range . start . line )
173
- let lineRangeFromCompletion = new Range (
174
- range . start . line ,
175
- range . start . character ,
176
- line . range . end . line ,
177
- line . range . end . character
178
- )
179
- let lineText = document . getText ( lineRangeFromCompletion )
180
- let match = lineText . match ( / ^ ( \S + ) ] :/ )
181
-
182
- if ( ! match ) {
183
- listener . dispose ( )
184
- return
185
- }
186
-
187
- let arbitraryValueRange = new Range (
188
- lineRangeFromCompletion . start . translate ( 0 , variantName . length + 2 ) ,
189
- lineRangeFromCompletion . start . translate ( 0 , match [ 1 ] . length )
190
- )
191
-
192
- if ( ! arbitraryValueRange . contains ( selection ) ) {
193
- listener . dispose ( )
194
- }
195
-
196
- if (
197
- event . kind === TextEditorSelectionChangeKind . Command &&
198
- selection . isEmpty &&
199
- selection . start . isEqual ( arbitraryValueRange . end . translate ( 0 , 2 ) )
200
- ) {
201
- commands . executeCommand ( 'editor.action.triggerSuggest' )
202
- }
203
- } )
204
- context . subscriptions . push ( listener )
205
- }
206
- )
207
- )
153
+ // context.subscriptions.push(
154
+ // commands.registerCommand(
155
+ // 'tailwindCSS.onInsertArbitraryVariantSnippet',
156
+ // (
157
+ // variantName: string,
158
+ // range: {
159
+ // start: { line: number; character: number }
160
+ // end: { line: number; character: number }
161
+ // }
162
+ // ) => {
163
+ // let listener = Window.onDidChangeTextEditorSelection((event) => {
164
+ // if (event.selections.length !== 1) {
165
+ // listener.dispose()
166
+ // return
167
+ // }
168
+
169
+ // let document = event.textEditor.document
170
+ // let selection = event.selections[0]
171
+
172
+ // let line = document.lineAt(range.start.line)
173
+ // let lineRangeFromCompletion = new Range(
174
+ // range.start.line,
175
+ // range.start.character,
176
+ // line.range.end.line,
177
+ // line.range.end.character
178
+ // )
179
+ // let lineText = document.getText(lineRangeFromCompletion)
180
+ // let match = lineText.match(/^(\S+)]:/)
181
+
182
+ // if (!match) {
183
+ // listener.dispose()
184
+ // return
185
+ // }
186
+
187
+ // let arbitraryValueRange = new Range(
188
+ // lineRangeFromCompletion.start.translate(0, variantName.length + 2),
189
+ // lineRangeFromCompletion.start.translate(0, match[1].length)
190
+ // )
191
+
192
+ // if (!arbitraryValueRange.contains(selection)) {
193
+ // listener.dispose()
194
+ // }
195
+
196
+ // if (
197
+ // event.kind === TextEditorSelectionChangeKind.Command &&
198
+ // selection.isEmpty &&
199
+ // selection.start.isEqual(arbitraryValueRange.end.translate(0, 2))
200
+ // ) {
201
+ // commands.executeCommand('editor.action.triggerSuggest')
202
+ // }
203
+ // })
204
+ // context.subscriptions.push(listener)
205
+ // }
206
+ // )
207
+ // )
208
208
209
209
let watcher = Workspace . createFileSystemWatcher ( `**/${ CONFIG_FILE_GLOB } ` , false , true , true )
210
210
0 commit comments