diff --git a/clang-format b/clang-format index 19df369..bd1a94f 100644 --- a/clang-format +++ b/clang-format @@ -1,6 +1,6 @@ --- Language: Cpp -BasedOnStyle: LLVM +# BasedOnStyle: Microsoft AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignArrayOfStructures: None @@ -37,9 +37,9 @@ AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false -AllowShortEnumsOnASingleLine: true -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Never +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None @@ -53,17 +53,17 @@ BinPackParameters: true BitFieldColonSpacing: Both BraceWrapping: AfterCaseLabel: false - AfterClass: false - AfterControlStatement: Never - AfterEnum: false - AfterExternBlock: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false + AfterClass: true + AfterControlStatement: Always + AfterEnum: true + AfterExternBlock: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true AfterUnion: false - BeforeCatch: false - BeforeElse: false + BeforeCatch: true + BeforeElse: true BeforeLambdaBody: false BeforeWhile: false IndentBraces: false @@ -75,13 +75,13 @@ BreakAfterJavaFieldAnnotations: false BreakArrays: true BreakBeforeBinaryOperators: None BreakBeforeConceptDeclarations: Always -BreakBeforeBraces: Attach +BreakBeforeBraces: Custom BreakBeforeInlineASMColon: OnlyMultiline BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon BreakInheritanceList: BeforeColon BreakStringLiterals: true -ColumnLimit: 0 +ColumnLimit: 200 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerIndentWidth: 4 @@ -122,7 +122,7 @@ IndentExternBlock: AfterExternBlock IndentGotoLabels: true IndentPPDirectives: None IndentRequiresClause: true -IndentWidth: 2 +IndentWidth: 4 IndentWrappedFunctionNames: false InsertBraces: false InsertNewlineAtEOF: false @@ -158,7 +158,7 @@ PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyIndentedWhitespace: 0 -PenaltyReturnTypeOnItsOwnLine: 60 +PenaltyReturnTypeOnItsOwnLine: 1000 PointerAlignment: Right PPIndentWidth: -1 QualifierAlignment: Leave @@ -213,7 +213,7 @@ StatementAttributeLikeMacros: StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION -TabWidth: 8 +TabWidth: 4 UseTab: Never WhitespaceSensitiveMacros: - BOOST_PP_STRINGIZE diff --git a/config/nvim/lua/user/highlights/init.lua b/config/nvim/lua/user/highlights/init.lua index f7e055b..50f3361 100644 --- a/config/nvim/lua/user/highlights/init.lua +++ b/config/nvim/lua/user/highlights/init.lua @@ -1,3 +1,3 @@ return { -- this table overrides highlights in all themes - -- Normal = { bg = "#000000" }, +-- Normal = { bg = "#333333" }, } diff --git a/config/nvim/lua/user/lsp/config/clangd.lua b/config/nvim/lua/user/lsp/config/clangd.lua index 8f48229..7b14437 100644 --- a/config/nvim/lua/user/lsp/config/clangd.lua +++ b/config/nvim/lua/user/lsp/config/clangd.lua @@ -1,5 +1,6 @@ return { capabilities = { offsetEncoding = "utf-16", + std = "c89", }, } diff --git a/config/nvim/lua/user/mappings.lua b/config/nvim/lua/user/mappings.lua index d87f7de..34801a0 100644 --- a/config/nvim/lua/user/mappings.lua +++ b/config/nvim/lua/user/mappings.lua @@ -11,7 +11,9 @@ return { ["bn"] = { "tabnew", desc = "New tab" }, ["bD"] = { function() - require("astronvim.utils.status").heirline.buffer_picker(function(bufnr) require("astronvim.utils.buffer").close(bufnr) end) + require("astronvim.utils.status").heirline.buffer_picker( + function(bufnr) require("astronvim.utils.buffer").close(bufnr) end + ) end, desc = "Pick to close", },