@@ -4,7 +4,7 @@ import "source-map-support/register";
44import * as VError from "verror" ;
55import {
66 commands , CompletionItem , CompletionItemKind , Disposable ,
7- ExtensionContext , Hover , languages , Location , Position , Range , TextDocument , Uri , window ,
7+ ExtensionContext , languages , Location , Position , Range , TextDocument , Uri , window ,
88 workspace ,
99} from "vscode" ;
1010import CssClassDefinition from "./common/css-class-definition" ;
@@ -202,40 +202,6 @@ const registerDefinitionProvider = (languageSelector: string, classMatchRegex: R
202202 } ,
203203} )
204204
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-
239205const registerHTMLProviders = ( disposables : Disposable [ ] ) =>
240206 workspace . getConfiguration ( )
241207 ?. get < string [ ] > ( Configuration . HTMLLanguages )
@@ -260,7 +226,6 @@ const registerJavaScriptProviders = (disposables: Disposable[]) =>
260226 disposables . push ( registerCompletionProvider ( extension , / c l a s s N a m e = (?: { ? " | { ? ' | { ? ` ) ( [ \w - @ : \/ ] * $ ) / ) ) ;
261227 disposables . push ( registerCompletionProvider ( extension , / c l a s s = (?: { ? " | { ? ' ) ( [ \w - @ : \/ ] * $ ) / ) ) ;
262228 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 - ] * $ ) / ) ) ;
264229 } ) ;
265230
266231function registerEmmetProviders ( disposables : Disposable [ ] ) {
0 commit comments