Skip to content

Commit b82219b

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Add enum type for code formatting presets
1 parent 8a2f71c commit b82219b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@
416416
"type":"string",
417417
"enum": [
418418
"Custom",
419-
"KR-Stroustrup",
420-
"KR-OTBS",
419+
"KR_Stroustrup",
420+
"KR_OTBS",
421421
"Allman"
422422
],
423423
"default": "KR-Stroustrup",

src/settings.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
import vscode = require('vscode');
88
import utils = require('./utils');
99

10+
enum CodeFormattingPreset {
11+
Custom,
12+
KR_Stroustrup,
13+
KR_OTBS,
14+
Allman
15+
}
16+
1017
export interface ICodeFormattingSettings {
11-
preset: string;
18+
preset: CodeFormattingPreset;
1219
openBraceOnSameLine: boolean;
1320
newLineAfterOpenBrace: boolean;
1421
newLineAfterCloseBrace: boolean;

0 commit comments

Comments
 (0)