mirror of
https://github.com/neovim/neovim.git
synced 2026-05-06 08:26:45 -04:00
fix(style): drop clang-format #39514
Problem: C formatting is enforced in CI via uncrustify, but when working on C code clangd formats on save via clang-format, forcing users to manually run `make formatc` after they're done. Solution: disable clang-format.
This commit is contained in:
committed by
GitHub
parent
9734f33bc7
commit
ad2cf23435
+1
-67
@@ -1,67 +1 @@
|
||||
BasedOnStyle: Google
|
||||
Language: Cpp
|
||||
ColumnLimit: 100
|
||||
IndentWidth: 2
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
IndentCaseLabels: false
|
||||
BreakBeforeBraces: Custom
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AlignTrailingComments: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
PenaltyReturnTypeOnItsOwnLine: 200
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
ContinuationIndentWidth: 2
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: No
|
||||
AlwaysBreakTemplateDeclarations: No
|
||||
AlignEscapedNewlines: DontAlign
|
||||
BinPackArguments: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
PointerAlignment: Right
|
||||
SortIncludes: true
|
||||
Cpp11BracedListStyle: false
|
||||
IncludeCategories:
|
||||
- Regex: '<[/[:alnum:].]+>'
|
||||
Priority: 0
|
||||
- Regex: '^"(nvim|vim)/'
|
||||
Priority: 1
|
||||
SortPriority: 1
|
||||
CaseSensitive: false
|
||||
AlignConsecutiveMacros: AcrossEmptyLines
|
||||
IndentPPDirectives: AfterHash
|
||||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||||
PPIndentWidth: 1
|
||||
ForEachMacros:
|
||||
- FOR_ALL_AUEVENTS
|
||||
- FOR_ALL_AUPATS_IN_EVENT
|
||||
- FOR_ALL_BUFFERS
|
||||
- FOR_ALL_BUFFERS_BACKWARDS
|
||||
- FOR_ALL_FRAMES
|
||||
- FOR_ALL_QFL_ITEMS
|
||||
- FOR_ALL_SIGNS_IN_BUF
|
||||
- FOR_ALL_TABS
|
||||
- FOR_ALL_TAB_WINDOWS
|
||||
- FOR_ALL_WINDOWS_IN_TAB
|
||||
- RBUFFER_EACH
|
||||
- RBUFFER_EACH_REVERSE
|
||||
- RBUFFER_UNTIL_EMPTY
|
||||
- RBUFFER_UNTIL_FULL
|
||||
- kl_iter
|
||||
DisableFormat: true
|
||||
|
||||
@@ -214,13 +214,6 @@ make lint # or lintc, lintlua, lintquery, lintdoc
|
||||
setlocal formatprg=uncrustify\ -q\ -l\ C\ -c\ src/uncrustify.cfg\ --no-backup
|
||||
endif
|
||||
```
|
||||
- There is also `.clang-format` which is "mostly" aligned with uncrustify.
|
||||
To use the Nvim `gq` command with `clang-format`:
|
||||
```vim
|
||||
if !empty(findfile('.clang-format', ';'))
|
||||
setlocal formatprg=clang-format\ -style=file
|
||||
endif
|
||||
```
|
||||
|
||||
### Navigate
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
|
||||
|
||||
#include "version.c.generated.h"
|
||||
|
||||
// clang-format off
|
||||
static const int vim_versions[] = { 801, 802, 900, 901, 902 };
|
||||
|
||||
static const int num_patches[] = { 2331, 3825, 1582, 1630, 221 };
|
||||
@@ -3962,7 +3961,6 @@ static const int *included_patchsets[] = {
|
||||
// 0
|
||||
},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
/// Compares a version string to the current Nvim version.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user