Clangd header-insertion
Moved
Unsolved
Qt Creator and other tools
-
I am not using Qt-Creator for my development, I am using CMake with Qt 6.6.0, and clangd as a language server.
My issue is that clangd's header-insertion feature is automatically including the header files, and not their macros. E.g. when I add
gDebug()
to a file, the header that is automatically inserted is<qlogging.h>
rather than<QDebug>
.Also, another symptom is: when declaring the Q_OBJECT macro in a header, clangd will automatically insert
<qobjectmacros.h>
, which is unnecessary.I have tried using both my
/usr/bin/clangd
and theclangd
inside the Qt distribution, and both have to same result.I haven't done any Qt-specific configuration for clangd, so perhaps I have not set up my lsp properly. Any advice is warmly welcomed.
-