File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,6 @@ export default class Blade implements vscode.CompletionItemProvider {
12
12
token : vscode . CancellationToken ,
13
13
context : vscode . CompletionContext ,
14
14
) : vscode . CompletionItem [ ] {
15
- let isBlade =
16
- [ "blade" , "laravel-blade" ] . includes ( document . languageId ) ||
17
- document . fileName . endsWith ( ".blade.php" ) ;
18
-
19
- if ( ! isBlade ) {
20
- return [ ] ;
21
- }
22
-
23
15
return this . getDefaultDirectives ( document , position ) . concat (
24
16
getCustomBladeDirectives ( ) . items . map ( ( directive ) => {
25
17
let completeItem = new vscode . CompletionItem (
Original file line number Diff line number Diff line change @@ -54,12 +54,13 @@ export function activate(context: vscode.ExtensionContext) {
54
54
55
55
console . log ( "Laravel VS Code Started..." ) ;
56
56
57
- const LANGUAGES = [
58
- { scheme : "file" , language : "php" } ,
57
+ const BLADE_LANGUAGES = [
59
58
{ scheme : "file" , language : "blade" } ,
60
59
{ scheme : "file" , language : "laravel-blade" } ,
61
60
] ;
62
61
62
+ const LANGUAGES = [ { scheme : "file" , language : "php" } , ...BLADE_LANGUAGES ] ;
63
+
63
64
initVendorWatchers ( ) ;
64
65
setParserBinaryPath ( context ) ;
65
66
@@ -113,6 +114,8 @@ export function activate(context: vscode.ExtensionContext) {
113
114
) ,
114
115
vscode . languages . registerCompletionItemProvider (
115
116
LANGUAGES ,
117
+ vscode . languages . registerCompletionItemProvider (
118
+ BLADE_LANGUAGES ,
116
119
new BladeCompletion ( ) ,
117
120
"@" ,
118
121
) ,
You can’t perform that action at this time.
0 commit comments