ClangCodeModel: Let clangd handle cuda sources

Fixes: QTCREATORBUG-28984
Change-Id: I7fbf5a671ff6f1d1ecd928d9be1f619dc32563a9
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-04-13 12:55:37 +02:00
parent ee4fc5b801
commit 02f2a93503

View File

@@ -364,8 +364,10 @@ ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir, c
{
setName(Tr::tr("clangd"));
LanguageFilter langFilter;
langFilter.mimeTypes = QStringList{"text/x-chdr", "text/x-csrc",
"text/x-c++hdr", "text/x-c++src", "text/x-objc++src", "text/x-objcsrc"};
using namespace CppEditor::Constants;
langFilter.mimeTypes = QStringList{C_HEADER_MIMETYPE, C_SOURCE_MIMETYPE,
CPP_HEADER_MIMETYPE, CPP_SOURCE_MIMETYPE, OBJECTIVE_CPP_SOURCE_MIMETYPE,
OBJECTIVE_C_SOURCE_MIMETYPE, CUDA_SOURCE_MIMETYPE};
setSupportedLanguage(langFilter);
setActivateDocumentAutomatically(true);
setCompletionAssistProvider(new ClangdCompletionAssistProvider(this));