编译器设置和代码样式设置
{
"code-runner.executorMap": {
"cpp": "/usr/bin/g++ -std=c++2a -o $fileNameWithoutExt $fileName && ./$fileNameWithoutExt"
},
"code-runner.runInTerminal": true,
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code, Menlo, 'Courier New', monospace",
"editor.bracketPairColorization.enabled": false,
"files.associations": {
"ios": "cpp"
},
"C_Cpp.errorSquiggles": "disabled",
"workbench.colorCustomizations": {
"[Xcode Classic (Dark)]": {
"editor.background": "#383838",
"editor.foreground": "#EAEAEA",
"editorLineNumber.foreground": "#82888f",
"editorLineNumber.activeForeground": "#869ef3",
"editorCursor.foreground": "#ffffff",
"editor.selectionBackground": "#515b70",
"editorBracketMatch.background": "#383a60",
"editorBracketMatch.border": "#ffef28"
}
},
"editor.tokenColorCustomizations": {
"[Xcode Classic (Dark)]": {
"textMateRules": [
{
"scope": [
"comment",
"comment.line",
"comment.block"
],
"settings": {
"foreground": "#5dd787"
}
},
{
"scope": [
"keyword",
"keyword.control",
"storage.type"
],
"settings": {
"foreground": "#fc5fa3",
"fontStyle": "bold"
}
},
{
"scope": [
"string"
],
"settings": {
"foreground": "#fc6a5d"
}
},
{
"scope": [
"constant.numeric"
],
"settings": {
"foreground": "#d0bf69"
}
},
{
"scope": [
"entity.name.function",
"support.function"
],
"settings": {
"foreground": "#67b7a4"
}
},
{
"scope": [
"entity.name.type.class",
"entity.name.type"
],
"settings": {
"foreground": "#5dd8ff"
}
},
{
"scope": [
"variable",
"variable.parameter"
],
"settings": {
"foreground": "#EAEAEA"
}
},
{
"scope": [
"constant"
],
"settings": {
"foreground": "#a167e6"
}
},
{
"scope": [
"punctuation.section.block",
"punctuation.definition.begin",
"punctuation.definition.end",
"meta.brace"
],
"settings": {
"foreground": "#EAEAEA"
}
},
{
"scope": [
"keyword",
"keyword.control",
"keyword.operator",
"storage.type",
"storage.modifier"
],
"settings": {
"fontStyle": ""
}
},
{
"scope": [
"keyword.operator",
"keyword.operator.arithmetic",
"keyword.operator.comparison",
"keyword.operator.logical",
"keyword.operator.assignment",
"keyword.operator.bitwise",
"punctuation.separator",
"punctuation.accessor"
],
"settings": {
"foreground": "#EAEAEA",
"fontStyle": ""
}
},
{
"scope": [
"punctuation.terminator.statement",
"punctuation.separator"
],
"settings": {
"foreground": "#EAEAEA"
}
}
]
}
}
}
clang-format格式设置
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 8
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: ForIndentation