vscode-clangd icon indicating copy to clipboard operation
vscode-clangd copied to clipboard

Multi-line comments

Open grigorig opened this issue 4 years ago • 11 comments

The official C/C++ extension has basic support for generating a nice layout for multi-line C-style comments, which is particularly useful for Doxygen and the like.

Typing /** and then pressing enter will generate

/**
 *

This kind of layout completion continues until you close the comment. I guess you can argue if vscode-clangd is the right place to implement it, but it's unlikely to be implemented in another extension since it is a "stock feature" in the official extension.

grigorig avatar Feb 20 '21 09:02 grigorig

For some reason I expected this behaviour to be handled at the server level, looks like I was wrong. https://github.com/microsoft/vscode-cpptools/blob/main/Extension/src/LanguageServer/languageConfig.ts

njames93 avatar Feb 20 '21 14:02 njames93

I think it could be handled at the server level (via onTypeFormatting), and indeed we have https://github.com/clangd/clangd/issues/174 on file for that.

But it's interesting to know that there are vscode APIs that make a client-side implementation easier.

HighCommander4 avatar Feb 20 '21 19:02 HighCommander4

Any news on multiline comment support (server- or client-side)? Would love to see this feature added to an otherwise amazing plugin :-)

NOhs avatar Jul 01 '21 13:07 NOhs

Still hopeful in 2023...

benjitusk avatar Jan 12 '23 16:01 benjitusk

Guess why I am here? :-)

buzhangjiuzhou avatar May 16 '23 07:05 buzhangjiuzhou

even after two whole years this hasn't been fixed yet?

ashtro-0 avatar Jun 06 '23 19:06 ashtro-0