File tree Expand file tree Collapse file tree 2 files changed +29
-13
lines changed
Expand file tree Collapse file tree 2 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 5252 "minItems" : 1 ,
5353 "uniqueItems" : true ,
5454 "description" : " Multiple folders"
55+ },
56+ "laravel_goto_view.extensions" : {
57+ "type" : " object" ,
58+ "default" : {
59+ "default" : " .blade.php"
60+ },
61+ "items" : {
62+ "type" : " string"
63+ },
64+ "minItems" : 1 ,
65+ "uniqueItems" : true ,
66+ "description" : " Multiple extensions"
5567 }
5668 }
5769 }
Original file line number Diff line number Diff line change @@ -15,27 +15,31 @@ export function getFilePaths(text:string, document:TextDocument): any {
1515 let result = [ ] ;
1616 if ( text . indexOf ( "::" ) != - 1 ) {
1717 let info = text . split ( '::' ) ;
18- let showPath = config . folders [ info [ 0 ] ] + "/" + info [ 1 ] . replace ( / \. / g, '/' ) + ".blade.php" ;
19- let filePath = workspaceFolder + showPath ;
20- if ( fs . existsSync ( filePath ) ) {
21- result . push ( {
22- "name" : info [ 0 ] ,
23- "showPath" : showPath ,
24- "fileUri" : Uri . file ( filePath )
25- } ) ;
26- }
27- } else {
28- for ( let item in config . folders ) {
29- let showPath = config . folders [ item ] + "/" + text . replace ( / \. / g, '/' ) + ".blade.php" ;
18+ for ( let extension in config . extensions ) {
19+ let showPath = config . folders [ info [ 0 ] ] + "/" + info [ 1 ] . replace ( / \. / g, '/' ) + config . extensions [ extension ] ;
3020 let filePath = workspaceFolder + showPath ;
3121 if ( fs . existsSync ( filePath ) ) {
3222 result . push ( {
33- "name" : item ,
23+ "name" : info [ 0 ] ,
3424 "showPath" : showPath ,
3525 "fileUri" : Uri . file ( filePath )
3626 } ) ;
3727 }
3828 }
29+ } else {
30+ for ( let item in config . folders ) {
31+ for ( let extension in config . extensions ) {
32+ let showPath = config . folders [ item ] + "/" + text . replace ( / \. / g, '/' ) + config . extensions [ extension ] ;
33+ let filePath = workspaceFolder + showPath ;
34+ if ( fs . existsSync ( filePath ) ) {
35+ result . push ( {
36+ "name" : item ,
37+ "showPath" : showPath ,
38+ "fileUri" : Uri . file ( filePath )
39+ } ) ;
40+ }
41+ }
42+ }
3943 }
4044
4145 return result ;
You can’t perform that action at this time.
0 commit comments