-
Notifications
You must be signed in to change notification settings - Fork 253
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
What version of clang-format is used / can I use the system clang-format? #930
Comments
BTW do you accept donations? |
ccls complie with libclang in your computer, it may be not in |
The option In addition the option Expected behavior is for this option to work on any amount of lines of comments. |
Observed behavior
I want to use the setting
SpacesInLineCommentPrefix
in my.clang-format
file. I can see that it's only available as of clang 13. This setting works flawlessly if I runclang-format
from the command line. However, when I press ff, which I have bound in vim tolua vim.lsp.buf.format()
, nothing happens when this setting is enabled. Not just this setting for comments isn't applied, but the formatting isn't working at all, even for things that used to work like indentation. If I take this setting out of.clang-format
and press ff, everything else is working.It's like
clang-format
is erroring out, but nothing is printed in Vim. I checked:messages
and I don't see anything in the LSP log file even with my log level set to debug (vim.lsp.set_log_level("debug")
).I saw in #910 that ccls uses the LLVM
clang-format
. However, I don't have/usr/lib/llvm-14/bin/clang-format
on my computer. I don't know how to figure out whichclang-format
it's trying to use. When I dowhich clang-format
, I get/usr/bin/clang-format
. Is there any way to get it to use thatclang-format
? I don't have any ofCMAKE_PREFIX_PATH
,LLVM_INCLUDE_DIR
,LLVM_BUILD_INCLUDE_DIR
why I try toecho
them in my terminal.Expected behavior
The setting
SpacesInLineCommentPrefix
in.clang-format
should not break formatting. There should be some way to setting ccls to use a differentclang-format
binary. There should be some error message when formatting fails.Steps to reproduce
.clang-format
:System information
git describe --tags --long
):0.20210330-1
from aptThe text was updated successfully, but these errors were encountered: