clang-format Format takes a long time to format the code
yShzZpp opened this issue · comments
ySh commented
When I select the number of rows in visual mode, formatting will wait an equal amount of time
'clangd.main' takes up 100% of the cpu. And when I withdraw, it takes a long time.
I don't know what the problem is, I use the command line clang-format very fast.
clang-format version:
Ubuntu clang-format version 13.0.0-++20210327080829+e5f2898bc751-1~exp1~20210327192522.3607
Here is the configuration file for my clang-format
{
BasedOnStyle: LLVM,
UseTab: Never,
IndentWidth: 2,
PointerAlignment: Left,
IndentCaseLabels: true,
SortIncludes: false,
TabWidth: 0,
BreakBeforeBraces: Allman,
AllowShortIfStatementsOnASingleLine: false,
IndentCaseLabels: true,
ColumnLimit: 0,
AccessModifierOffset: -2,
NamespaceIndentation: All,
FixNamespaceComments: false,
IndentAccessModifiers: true,
}
chtenb commented
I'm afraid I can't help you. vim-autoformat shouldn't do anything special, except calling the clang CLI. You could try following the troubleshooting steps https://github.com/vim-autoformat/vim-autoformat#help-the-formatter-doesnt-work-as-expected