Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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"
30#include "qqmlhover_p.h"
32
34
36
37namespace QmlLsp {
38
40{
42public:
43 QQmlLanguageServer(std::function<void(const QByteArray &)> sendData,
44 QQmlToolingSettings *settings = nullptr);
45
46 QString name() const final;
47 void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) final;
48 void setupCapabilities(const QLspSpecification::InitializeParams &clientInfo,
49 QLspSpecification::InitializeResult &serverInfo) final;
50
51 int returnValue() const;
52
58
59public Q_SLOTS:
60 void exit();
61 void errorExit();
62
63private:
64 QQmlCodeModel m_codeModel;
65 QLanguageServer m_server;
66 TextSynchronization m_textSynchronization;
67 QmlLintSuggestions m_lint;
68 WorkspaceHandlers m_workspace;
69 QmlCompletionSupport m_completionSupport;
70 QmlGoToTypeDefinitionSupport m_navigationSupport;
71 QmlGoToDefinitionSupport m_definitionSupport;
72 QQmlFindUsagesSupport m_referencesSupport;
73 QQmlDocumentFormatting m_documentFormatting;
74 QQmlRenameSymbolSupport m_renameSupport;
75 QQmlRangeFormatting m_rangeFormatting;
76 QQmlHover m_hover;
77 QQmlHighlightSupport m_highlightSupport;
78 int m_returnValue = 1;
79};
80
81} // namespace QmlLsp
83#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:129
Sets up a QmlLanguageServer.
TextSynchronization * textSynchronization()
QQmlLanguageServer(std::function< void(const QByteArray &)> sendData, QQmlToolingSettings *settings=nullptr)
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]