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 77.gitignore
88tsconfig.json
99vsc-extension-quickstart.md
10+ .history
11+ jsconfig.json
12+ .eslintrc.json
Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## 1.3.0
4+ - add a way to stop the extension from search big files
5+ - fix vendor resolveing
6+
37## 1.2.5
48- Optimize regular expressions
59
Original file line number Diff line number Diff line change 88 "vscode" : " ^1.19.0"
99 },
1010 "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" ,
1912 "categories" : [
2013 " Other"
2114 ],
4235 "default" : true ,
4336 "description" : " Display path name"
4437 },
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+ },
4543 "laravel_goto_view.folders" : {
4644 "type" : " object" ,
4745 "default" : {
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ import * as util from '../util';
1313
1414export default class LinkProvider implements vsDocumentLinkProvider {
1515 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 ;
1717 let config = workspace . getConfiguration ( 'laravel_goto_view' ) ;
18+ let linesCount = doc . lineCount
19+ let documentLinks = [ ] ;
1820 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;
2021
21- if ( config . quickJump ) {
22- while ( index < doc . lineCount ) {
22+ if ( config . quickJump && linesCount <= config . maxLinesCount ) {
23+ while ( index < linesCount ) {
2324 let line = doc . lineAt ( index ) ;
2425 let result = line . text . match ( reg ) ;
2526
@@ -35,6 +36,7 @@ export default class LinkProvider implements vsDocumentLinkProvider {
3536 } ;
3637 }
3738 }
39+
3840 index ++ ;
3941 }
4042 }
You can’t perform that action at this time.
0 commit comments