This forum has been archived. All content is frozen. Please use KDE Discuss instead.

LSP client in Kate doesn't find (common) Qt headers

Tags: None
(comma "," separated)
equaeghe
Registered Member
Posts
67
Karma
0
OS
I'm using kate to work on a Qt project. I have the LSP plugin installed. It analyzes the code, but gets stuck because it apparently can't find common Qt headers.
For example, in a file with
Code: Select all
#include <QString>

it reports
Code: Select all
clang: 'QString' file not found

This does make some sense, as the file is QtCore/qstring.h, but I would guess it would be intelligent enough to realize this, given that the project compiles fine (but with GCC).

Is there any configuration I should fix for LSP to find the headers?
Petross404 (petross)
Registered Member
Posts
16
Karma
0
Is compile_commands.json generated by your build tool (cmake/meson etc) ?
equaeghe
Registered Member
Posts
67
Karma
0
OS
Petross404 (petross) wrote:Is compile_commands.json generated by your build tool (cmake/meson etc) ?

Indeed, that was the problem. Making sure it was generated by adding
Code: Select all
set(CMAKE_EXPORT_COMPILE_COMMANDS True)
to the file CMakeLists.txt fixed the problem (at least for most files).


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]