Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format Format takes a long time to format the code #393

Open
yShzZpp opened this issue Nov 10, 2023 · 1 comment
Open

clang-format Format takes a long time to format the code #393

yShzZpp opened this issue Nov 10, 2023 · 1 comment

Comments

@yShzZpp
Copy link

yShzZpp commented Nov 10, 2023

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
Copy link
Member

chtenb commented Nov 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants