Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmllanguageserver_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLLANGUAGESERVER_P_H
5#define QQMLLANGUAGESERVER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qlanguageserver_p.h"
19#include "qqmlcodemodel_p.h"
23#include "qworkspace_p.h"
26#include "qqmlformatting_p.h"
28
30
32
33namespace QmlLsp {
34
36{
38public:
39 QQmlLanguageServer(std::function<void(const QByteArray &)> sendData,
40 QQmlToolingSettings *settings = nullptr);
41
42 QString name() const final;
43 void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) final;
44 void setupCapabilities(const QLspSpecification::InitializeParams &clientInfo,
45 QLspSpecification::InitializeResult &serverInfo) final;
46
47 int returnValue() const;
48
54
55public Q_SLOTS:
56 void exit();
57 void errorExit();
58
59private:
60 QQmlCodeModel m_codeModel;
61 QLanguageServer m_server;
62 TextSynchronization m_textSynchronization;
63 QmlLintSuggestions m_lint;
64 WorkspaceHandlers m_workspace;
65 QmlCompletionSupport m_completionSupport;
66 QmlGoToTypeDefinitionSupport m_navigationSupport;
67 QmlGoToDefinitionSupport m_definitionSupport;
68 QQmlFindUsagesSupport m_referencesSupport;
69 QQmlDocumentFormatting m_documentFormatting;
70 int m_returnValue = 1;
71};
72
73} // namespace QmlLsp
75#endif // QQMLLANGUAGESERVER_P_H
\inmodule QtCore
Definition qbytearray.h:57
Implements a server for the language server protocol.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Sets up a QmlLanguageServer.
TextSynchronization * textSynchronization()
void setupCapabilities(const QLspSpecification::InitializeParams &clientInfo, QLspSpecification::InitializeResult &serverInfo) final
void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) final
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SLOTS
QSettings settings("MySoft", "Star Runner")
[0]