Skip to content

Commit

Permalink
EditorConfig Support (#5932)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarik-brown authored Aug 20, 2020
1 parent f82c1ed commit 61c22d7
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 18 deletions.
23 changes: 19 additions & 4 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,24 @@
"description": "%c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.description%",
"scope": "resource"
},
"C_Cpp.vcFormat.indent.preserveIndentationWithinParentheses": {
"C_Cpp.vcFormat.indent.withinParentheses": {
"type": "string",
"enum": [
"alignToParenthesis",
"indent"
],
"enumDescriptions": [
"%c_cpp.configuration.vcFormat.indent.withinParentheses.alignToParenthesis.description%",
"%c_cpp.configuration.vcFormat.indent.withinParentheses.indent.description%"
],
"default": "indent",
"description": "%c_cpp.configuration.vcFormat.indent.withinParentheses.description%",
"scope": "resource"
},
"C_Cpp.vcFormat.indent.preserveWithinParentheses": {
"type": "boolean",
"default": false,
"description": "%c_cpp.configuration.vcFormat.indent.preserveIndentationWithinParentheses.description%",
"description": "%c_cpp.configuration.vcFormat.indent.preserveWithinParentheses.description%",
"scope": "resource"
},
"C_Cpp.vcFormat.indent.caseLabels": {
Expand Down Expand Up @@ -300,13 +314,13 @@
},
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": {
"type": "boolean",
"default": true,
"default": false,
"description": "%c_cpp.configuration.vcFormat.newLine.closeBraceSameLine.emptyType.description%",
"scope": "resource"
},
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": {
"type": "boolean",
"default": true,
"default": false,
"description": "%c_cpp.configuration.vcFormat.newLine.closeBraceSameLine.emptyFunction.description%",
"scope": "resource"
},
Expand Down Expand Up @@ -2219,6 +2233,7 @@
"@typescript-eslint/parser": "^2.19.2",
"async-child-process": "^1.1.1",
"await-notify": "^1.0.1",
"editorconfig": "^0.15.3",
"escape-string-regexp": "^2.0.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
Expand Down
7 changes: 5 additions & 2 deletions Extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
"c_cpp.configuration.formatting.Default.description": "clang-format will be used to format code",
"c_cpp.configuration.formatting.Disabled.description": "Code formatting will be disabled",
"c_cpp.configuration.vcFormat.indent.braces.description": "Braces are indented by the amount specified in the Editor: Tab Size setting",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.description": "When a new line is typed, indent the new line relatively to:",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.description": "Indent new lines relatively to:",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.outermostParenthesis.description": "the outermost open parenthesis",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.innermostParenthesis.description": "the innermost open parenthesis",
"c_cpp.configuration.vcFormat.indent.multiLineRelativeTo.statementBegin.description": "the beginning of the current statement",
"c_cpp.configuration.vcFormat.indent.preserveIndentationWithinParentheses.description": "When a new line is typed, it is aligned under the opening parenthesis or it is indented by the amount specified in the Editor: Tab Size setting",
"c_cpp.configuration.vcFormat.indent.withinParentheses.description": "When a new line is typed, it is aligned under the opening parenthesis or based on `C_Cpp.vcFormat.indent.multiLineRelativeTo`",
"c_cpp.configuration.vcFormat.indent.withinParentheses.alignToParenthesis.description": "New line is aligned under the opening parenthesis",
"c_cpp.configuration.vcFormat.indent.withinParentheses.indent.description": "New line is indented based on `C_Cpp.vcFormat.indent.multiLineRelativeTo`",
"c_cpp.configuration.vcFormat.indent.preserveWithinParentheses.description": "In existing code, preserve the existing indent alignment of new lines within parentheses",
"c_cpp.configuration.vcFormat.indent.caseLabels.description": "Labels are indented relative to switch statements by the amount specified in the Editor: Tab Size setting",
"c_cpp.configuration.vcFormat.indent.caseContents.description": "Code inside case is indented relative to its label by the amount specified in the Editor: Tab Size setting",
"c_cpp.configuration.vcFormat.indent.caseContentsWhenBlock.description": "Indent braces following a case statement by the amount specified in the Editor: Tab Size setting",
Expand Down
Loading

0 comments on commit 61c22d7

Please sign in to comment.