@@ -4,7 +4,7 @@ import "source-map-support/register";
4
4
import * as VError from "verror" ;
5
5
import {
6
6
commands , CompletionItem , CompletionItemKind , Disposable ,
7
- ExtensionContext , Hover , languages , Location , Position , Range , TextDocument , Uri , window ,
7
+ ExtensionContext , languages , Location , Position , Range , TextDocument , Uri , window ,
8
8
workspace ,
9
9
} from "vscode" ;
10
10
import CssClassDefinition from "./common/css-class-definition" ;
@@ -202,40 +202,6 @@ const registerDefinitionProvider = (languageSelector: string, classMatchRegex: R
202
202
} ,
203
203
} )
204
204
205
- const registerHoverProvider = ( languageSelector : string , classMatchRegex : RegExp ) => languages . registerHoverProvider ( languageSelector , {
206
- provideHover ( document , position , _token ) {
207
- {
208
- const start : Position = new Position ( position . line , 0 ) ;
209
- const range : Range = new Range ( start , position ) ;
210
- const text : string = document . getText ( range ) ;
211
-
212
- const rawClasses : RegExpMatchArray | null = text . match ( classMatchRegex ) ;
213
- if ( ! rawClasses || rawClasses . length === 1 ) {
214
- return ;
215
- }
216
- }
217
-
218
- const range : Range | undefined = document . getWordRangeAtPosition ( position , / [ - \w , @ \\ : \[ \] ] + / ) ;
219
- if ( range == null ) {
220
- return ;
221
- }
222
-
223
- const word : string = document . getText ( range ) ;
224
-
225
- // Creates a collection of CompletionItem based on the classes already cached
226
- const definition = uniqueDefinitions . find ( ( definition ) => {
227
- return definition . className === word
228
- } ) ;
229
- if ( definition == null ) {
230
- return ;
231
- }
232
-
233
- if ( definition . comments != null ) {
234
- return new Hover ( `**.\`${ word } \`**\n${ definition . comments . join ( "\n\n" ) } ` , range )
235
- }
236
- } ,
237
- } )
238
-
239
205
const registerHTMLProviders = ( disposables : Disposable [ ] ) =>
240
206
workspace . getConfiguration ( )
241
207
?. get < string [ ] > ( Configuration . HTMLLanguages )
@@ -260,7 +226,6 @@ const registerJavaScriptProviders = (disposables: Disposable[]) =>
260
226
disposables . push ( registerCompletionProvider ( extension , / c l a s s N a m e = (?: { ? " | { ? ' | { ? ` ) ( [ \w - @ : \/ ] * $ ) / ) ) ;
261
227
disposables . push ( registerCompletionProvider ( extension , / c l a s s = (?: { ? " | { ? ' ) ( [ \w - @ : \/ ] * $ ) / ) ) ;
262
228
disposables . push ( registerDefinitionProvider ( extension , / c l a s s (?: N a m e ) ? = [ " | ' ] ( [ \w - ] * $ ) / ) ) ;
263
- disposables . push ( registerHoverProvider ( extension , / c l a s s (?: N a m e ) ? = [ " | ' ] ( [ \w - ] * $ ) / ) ) ;
264
229
} ) ;
265
230
266
231
function registerEmmetProviders ( disposables : Disposable [ ] ) {
0 commit comments