File tree 3 files changed +11
-16
lines changed
3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 16
16
],
17
17
"main" : " ./out/extension" ,
18
18
"contributes" : {
19
- "snippets" : [
20
- {
21
- "language" : " perl" ,
22
- "path" : " ./snippets/perl.json"
23
- }
24
- ],
19
+ "snippets" : [{
20
+ "language" : " perl" ,
21
+ "path" : " ./snippets/perl.json"
22
+ }],
25
23
"configuration" : {
26
24
"type" : " object" ,
27
25
"title" : " Simple Perl configuration" ,
28
26
"properties" : {
29
- "perl.perltidy" : {
27
+ "simple- perl.perltidy" : {
30
28
"type" : " string" ,
31
29
"default" : " perltidy" ,
32
30
"description" : " The name or path to the perltidy executable that will be used when formatting code."
33
31
},
34
- "perl.perltidyArgs" : {
32
+ "shimple- perl.perltidyArgs" : {
35
33
"type" : " array" ,
36
34
"default" : [
37
35
" -q"
55
53
"@types/node" : " ~10.12.18" ,
56
54
"@types/mocha" : " ~5.2.5"
57
55
}
58
- }
56
+ }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export class PerlFormattingProvider implements DocumentRangeFormattingEditProvid
18
18
) ;
19
19
}
20
20
21
- const config = workspace . getConfiguration ( "perl" ) ;
21
+ const config = workspace . getConfiguration ( "simple- perl" ) ;
22
22
const executable = config . get ( "perltidy" , "perltidy" ) ;
23
23
const args = config . get ( "perltidyArgs" , [ "-q" ] ) ;
24
24
const text = document . getText ( range ) ;
@@ -27,7 +27,7 @@ export class PerlFormattingProvider implements DocumentRangeFormattingEditProvid
27
27
child . stdin . write ( text ) ;
28
28
child . stdin . end ( ) ;
29
29
30
- const stdoutChunks : string [ ] = [ ] ;
30
+ const stdoutChunks : string [ ] = [ ] ;
31
31
child . stdout . on ( "data" , ( chunk : Buffer ) => {
32
32
stdoutChunks . push ( chunk . toString ( ) ) ;
33
33
} ) ;
@@ -48,7 +48,7 @@ export class PerlFormattingProvider implements DocumentRangeFormattingEditProvid
48
48
const errorMessage = stderr . concat ( stdout ) . trim ( ) ;
49
49
reject ( `Could not format, code: ${ code } , error: ${ errorMessage } ` ) ;
50
50
} else {
51
- resolve ( [ new TextEdit ( range , stdout ) ] ) ;
51
+ resolve ( [ new TextEdit ( range , stdout ) ] ) ;
52
52
}
53
53
} ) ;
54
54
} ) . catch ( ( reason ) => {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default class PerlLinterProvider {
15
15
16
16
public constructor ( subscriptions : Disposable [ ] ) {
17
17
this . diagnosticCollection = languages . createDiagnosticCollection ( ) ;
18
- this . configuration = workspace . getConfiguration ( "perl-toolbox .lint" ) ;
18
+ this . configuration = workspace . getConfiguration ( "simple-perl .lint" ) ;
19
19
20
20
workspace . onDidCloseTextDocument (
21
21
( textDocument ) => {
@@ -46,9 +46,6 @@ export default class PerlLinterProvider {
46
46
if ( textDocument . languageId !== "perl" ) {
47
47
return ;
48
48
}
49
- if ( ! this . configuration . enabled ) {
50
- return ;
51
- }
52
49
const decodedChunks : Buffer [ ] = [ ] ;
53
50
const tempfilepath =
54
51
tmpdir ( ) +
You can’t perform that action at this time.
0 commit comments