File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 55
66'use strict' ;
77
8+ import { configuration } from '../configuration/config' ;
9+ import { defaults } from '../configuration/defaults' ;
810import { GQuickPick } from './common' ;
911
1012interface State {
@@ -17,11 +19,6 @@ interface State {
1719
1820const title = 'Line Number Options' ;
1921
20- const defaults = {
21- start : 10 ,
22- increment : 10 ,
23- } ;
24-
2522export class LineNumbersInput extends GQuickPick {
2623 private readonly _state ;
2724
@@ -42,7 +39,9 @@ export class LineNumbersInput extends GQuickPick {
4239 title,
4340 step : 1 ,
4441 totalSteps : 2 ,
45- value : this . _state . start ?. toString ( ) || defaults . start . toString ( ) ,
42+ value : (
43+ configuration . getParam < number > ( 'lineNumberer.defaultStart' ) ?? defaults . lineNumberer . defaultStart
44+ ) . toString ( ) ,
4645 prompt : 'Choose Start Number' ,
4746 validate : this . validate ,
4847 shouldResume : this . shouldResume ,
@@ -56,7 +55,10 @@ export class LineNumbersInput extends GQuickPick {
5655 title,
5756 step : 2 ,
5857 totalSteps : 2 ,
59- value : this . _state . increment ?. toString ( ) || defaults . increment . toString ( ) ,
58+ value : (
59+ configuration . getParam < number > ( 'lineNumberer.defaultIncrement' ) ??
60+ defaults . lineNumberer . defaultIncrement
61+ ) . toString ( ) ,
6062 prompt : 'Choose Increment Number' ,
6163 validate : this . validate ,
6264 shouldResume : this . shouldResume ,
You can’t perform that action at this time.
0 commit comments