From 7f4342b687f736b51ec194eb714a2ddccfbea35e Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 13 Dec 2021 15:30:21 +0100 Subject: Python: add python specific language client settings Change-Id: I1b9a194f32f3f13381954539229b02e03e3af058 Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/python/pythonlanguageclient.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'src/plugins/python/pythonlanguageclient.h') diff --git a/src/plugins/python/pythonlanguageclient.h b/src/plugins/python/pythonlanguageclient.h index 30bc834a51..67e0e5f104 100644 --- a/src/plugins/python/pythonlanguageclient.h +++ b/src/plugins/python/pythonlanguageclient.h @@ -27,18 +27,41 @@ #include +#include +#include + namespace Core { class IDocument; } -namespace LanguageClient { -class Client; -class StdIOSettings; -} +namespace LanguageClient { class Client; } namespace TextEditor { class TextDocument; } namespace Python { namespace Internal { +class Interpreter; struct PythonLanguageServerState; +class PyLSSettings : public LanguageClient::StdIOSettings +{ +public: + PyLSSettings(); + + QString interpreterId() const { return m_interpreterId; } + void setInterpreter(const QString &interpreterId); + + bool isValid() const final; + QVariantMap toMap() const final; + void fromMap(const QVariantMap &map) final; + bool applyFromSettingsWidget(QWidget *widget) final; + QWidget *createSettingsWidget(QWidget *parent) const final; + LanguageClient::BaseSettings *copy() const final; + LanguageClient::Client *createClient(LanguageClient::BaseClientInterface *interface) const final; + +private: + QString m_interpreterId; + + PyLSSettings(const PyLSSettings &other) = default; +}; + class PyLSConfigureAssistant : public QObject { Q_OBJECT -- cgit v1.2.1