clangd / vscode-clangd

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

quick fix can't show add definition to .cpp files? #620

Closed aiyolo closed 2 months ago

aiyolo commented 2 months ago

when I use other IDE, after I write function decraretion in .h file, I can use alt+enter to add an empty definition to .cpp files. It seems that clangd doesn't supprt this feature.

I just wonder that people using clangd how to deal with this situation?

HighCommander4 commented 2 months ago

If you type an empty definition ({} instead of ; at the end of the function), then a "Move function body out of line" code action is available.

HighCommander4 commented 2 months ago

For a code action that works on declarations, we have https://github.com/clangd/clangd/issues/445 on file.

HighCommander4 commented 2 months ago

Duplicate of https://github.com/clangd/clangd/issues/445