You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 run clang-format from the command line. However, when I press ff, which I have bound in vim to lua 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 which clang-format it's trying to use. When I do which clang-format, I get /usr/bin/clang-format. Is there any way to get it to use that clang-format? I don't have any of CMAKE_PREFIX_PATH, LLVM_INCLUDE_DIR, LLVM_BUILD_INCLUDE_DIR why I try to echo 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 different clang-format binary. There should be some error message when formatting fails.
Steps to reproduce
Put this in .clang-format:
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
Trigger LSP formatting
System information
ccls version (git describe --tags --long): 0.20210330-1 from apt
clang version: 14
OS: Pop_os
Editor: neovim v0.9.0-dev
Language client (and version): neovim built in
The text was updated successfully, but these errors were encountered:
The option SpacesInLineCommentPrefix works only for single line comments and does not work if comments span multiple lines regardless if // style or /**/ style is used.
In addition the option ReflowComments must be set to true
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: