clangd / vscode-clangd

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

[feature request] Provide detailed completion configurations and some enhancements. #742

Open FlyinCow opened 11 hours ago

FlyinCow commented 11 hours ago

I switch to clangd from ms-vscode.cpptools due to its significant performance issue, but it seems clangd does not have a detailed auto-completion configurations. This leads to some confliction to my code habit, and some behaviours are kind of annoying.

Examples:

ex1

image If I accept this suggestion there will be brackets after class name, but I just want the class name only

ex2

image I implement this class completely in a namespace, but when using delegating constructors clangd still provides namespace::

ex3

C_Cpp.autocompleteAddParentheses is a sweet option, but in clangd this is enforced open.

ex4

It seems there's some compatibility issue with MSVC, codes are compileable but clangd complains. For example, clangd complains that std::runtime_error is not a member of std with #include<excetion>. I do know that I should #include<stdexcept> but this code can be built without any warnings/errors.

FlyinCow commented 11 hours ago

Another enhancement is, clangd doesn't support fuzzy matching in auto suggestion. Is this due to performance consideration?