clangd/vscode-clangd

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

aiyolo opened this issue · 3 comments

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?

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.

For a code action that works on declarations, we have clangd/clangd#445 on file.