clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
591 stars 97 forks source link

Multi-line comments #155

Open grigorig opened 3 years ago

grigorig commented 3 years ago

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.

njames93 commented 3 years ago

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

HighCommander4 commented 3 years ago

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.

NOhs commented 3 years ago

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

benjitusk commented 1 year ago

Still hopeful in 2023...

buzhangjiuzhou commented 1 year ago

Guess why I am here? :-)

ashtro-0 commented 1 year ago

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