Nathan Ridge
Nathan Ridge
Fixed by https://github.com/llvm/llvm-project/commit/c9ef33e1d8a8aeb68a18f24af6d9fc9ab4ecf257
Duplicate of https://github.com/llvm/llvm-project/issues/63605
(Updated issue title to reflect that this affects snippets in general)
That would be cool. The functionality for inferring clang-format settings from existing source code would have to be written, I'm not aware of that existing in-tree. (Nor could I find...
> (Updated issue title to reflect that this affects snippets in general) Actually, I think this issue generalizes further to text inserted when accepting a code completion proposal in general...
`.clangd` is a configuration file you can create in the project's root directory, see https://clangd.llvm.org/config.html#files
> Your fix will go out out in clangd 16, but not in the 15.0.x patches, right? Yep. Unfortunately, I don't think any further 15.x releases are planned at this...
> does Sema have an interface for consumers to provide settings already? The interface is [CodeCompleteOptions](https://searchfox.org/llvm/rev/0bc0edb847a0cc473a8b005c4725948de3306a20/clang/include/clang/Sema/CodeCompleteOptions.h#15), which clangd provides for e.g. signature help [here](https://searchfox.org/llvm/rev/0bc0edb847a0cc473a8b005c4725948de3306a20/clang-tools-extra/clangd/CodeComplete.cpp#2165-2169).
> But surely clangd doesn't have to send the comment tokens? The idea behind sending _something_ is so that inactive regions look different in some way, so you can tell...
> Still open. Are you experiencing the problem discussed in the issue title in clangd 15 or newer?