File tree Expand file tree Collapse file tree 4 files changed +19
-12
lines changed Expand file tree Collapse file tree 4 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 7
7
.gitignore
8
8
tsconfig.json
9
9
vsc-extension-quickstart.md
10
+ .history
11
+ jsconfig.json
12
+ .eslintrc.json
Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## 1.3.0
4
+ - add a way to stop the extension from search big files
5
+ - fix vendor resolveing
6
+
3
7
## 1.2.5
4
8
- Optimize regular expressions
5
9
Original file line number Diff line number Diff line change 8
8
"vscode" : " ^1.19.0"
9
9
},
10
10
"icon" : " images/icon.jpg" ,
11
- "bugs" : {
12
- "url" : " https://github.com/codingyu/laravel-goto-view/issues"
13
- },
14
- "homepage" : " https://github.com/codingyu/laravel-goto-view/blob/master/README.md" ,
15
- "repository" : {
16
- "type" : " git" ,
17
- "url" : " https://github.com/codingyu/laravel-goto-view.git"
18
- },
11
+ "repository" : " https://github.com/codingyu/laravel-goto-view.git" ,
19
12
"categories" : [
20
13
" Other"
21
14
],
42
35
"default" : true ,
43
36
"description" : " Display path name"
44
37
},
38
+ "laravel_goto_view.maxLinesCount" : {
39
+ "type" : " integer" ,
40
+ "default" : 300 ,
41
+ "description" : " stop the extension if the opened file lines count is more than"
42
+ },
45
43
"laravel_goto_view.folders" : {
46
44
"type" : " object" ,
47
45
"default" : {
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ import * as util from '../util';
13
13
14
14
export default class LinkProvider implements vsDocumentLinkProvider {
15
15
public provideDocumentLinks ( doc : TextDocument ) : ProviderResult < DocumentLink [ ] > {
16
- let documentLinks = [ ] ;
16
+ let reg = / (?< = v i e w \( | @ i n c l u d e \( | @ e x t e n d s \( | @ c o m p o n e n t \( ) ( [ ' " ] ) [ ^ ' " ] * \1 / g ;
17
17
let config = workspace . getConfiguration ( 'laravel_goto_view' ) ;
18
+ let linesCount = doc . lineCount
19
+ let documentLinks = [ ] ;
18
20
let index = 0 ;
19
- let reg = / (?< = v i e w \( | @ i n c l u d e \( | @ e x t e n d s \( | @ c o m p o n e n t \( ) ( [ ' " ] ) [ ^ ' " ] * \1/ g;
20
21
21
- if ( config . quickJump ) {
22
- while ( index < doc . lineCount ) {
22
+ if ( config . quickJump && linesCount <= config . maxLinesCount ) {
23
+ while ( index < linesCount ) {
23
24
let line = doc . lineAt ( index ) ;
24
25
let result = line . text . match ( reg ) ;
25
26
@@ -35,6 +36,7 @@ export default class LinkProvider implements vsDocumentLinkProvider {
35
36
} ;
36
37
}
37
38
}
39
+
38
40
index ++ ;
39
41
}
40
42
}
You can’t perform that action at this time.
0 commit comments