11'use strict' ;
22
3- // (c) 2016 Ecmel Ercan
3+ // (c) 2016-2017 Ecmel Ercan
44
55import * as vsc from 'vscode' ;
66import * as lst from 'vscode-languageserver-types' ;
@@ -43,7 +43,7 @@ class StyleServer implements vsc.CompletionItemProvider, vsc.HoverProvider {
4343
4444 private regex = [
4545 / s t y l e = [ " | ' ] ( [ ^ " ^ ' ] * $ ) / i //,
46- // /<style[^\<\s\S]*\>([^\<]*)/i
46+ // /<style[^\<\s\S]*\>([^\<]*)/i
4747 ] ;
4848
4949 private convertCompletionList ( list : lst . CompletionList ) : vsc . CompletionList {
@@ -70,10 +70,10 @@ class StyleServer implements vsc.CompletionItemProvider, vsc.HoverProvider {
7070 return new Snippet ( '.c {\n' + tag [ 1 ] , position . character ) ;
7171 }
7272
73- // tag = this.regex[1].exec(text);
74- // if (tag) {
75- // return new Snippet(tag[1], position.character);
76- // }
73+ // tag = this.regex[1].exec(text);
74+ // if (tag) {
75+ // return new Snippet(tag[1], position.character);
76+ // }
7777
7878 return null ;
7979 }
@@ -245,19 +245,27 @@ export function activate(context: vsc.ExtensionContext) {
245245 [ 'html' , 'laravel-blade' , 'razor' , 'vue' , 'blade' ] , classServer ) ) ;
246246
247247 // https://github.com/Microsoft/vscode/issues/13675
248- // let wp = /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\.\"\,\<\>\/\?\s]+)/g;
248+ let wp = / ( - ? \d * \. \d \w * ) | ( [ ^ \` \~ \! \@ \# \% \^ \& \* \( \) \= \+ \[ \{ \] \} \\ \| \; \: \' \. \" \, \< \> \/ \? \s ] + ) / g;
249249
250250 // context.subscriptions.push(vsc.languages.setLanguageConfiguration('html', {
251251 // wordPattern: wp
252252 // }));
253253
254- // context.subscriptions.push(vsc.languages.setLanguageConfiguration('laravel-blade', {
255- // wordPattern: wp
256- // }));
254+ context . subscriptions . push ( vsc . languages . setLanguageConfiguration ( 'laravel-blade' , {
255+ wordPattern : wp
256+ } ) ) ;
257257
258- // context.subscriptions.push(vsc.languages.setLanguageConfiguration('razor', {
259- // wordPattern: wp
260- // }));
258+ context . subscriptions . push ( vsc . languages . setLanguageConfiguration ( 'razor' , {
259+ wordPattern : wp
260+ } ) ) ;
261+
262+ context . subscriptions . push ( vsc . languages . setLanguageConfiguration ( 'vue' , {
263+ wordPattern : wp
264+ } ) ) ;
265+
266+ context . subscriptions . push ( vsc . languages . setLanguageConfiguration ( 'blade' , {
267+ wordPattern : wp
268+ } ) ) ;
261269}
262270
263271export function deactivate ( ) {
0 commit comments