diff options
| author | David Schulz <[email protected]> | 2021-12-13 15:30:21 +0100 |
|---|---|---|
| committer | David Schulz <[email protected]> | 2022-01-18 13:21:53 +0000 |
| commit | 7f4342b687f736b51ec194eb714a2ddccfbea35e (patch) | |
| tree | 0c32da0d19cf36fe7df663b1dd18fc2bb09366ad /src/plugins/python/pythonlanguageclient.h | |
| parent | ee4ed51a5740c121312522f6091d0fb70db457ab (diff) | |
Python: add python specific language client settings
Change-Id: I1b9a194f32f3f13381954539229b02e03e3af058
Reviewed-by: <[email protected]>
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.h')
| -rw-r--r-- | src/plugins/python/pythonlanguageclient.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/plugins/python/pythonlanguageclient.h b/src/plugins/python/pythonlanguageclient.h index 30bc834a516..67e0e5f104d 100644 --- a/src/plugins/python/pythonlanguageclient.h +++ b/src/plugins/python/pythonlanguageclient.h @@ -27,18 +27,41 @@ #include <utils/fileutils.h> +#include <languageclient/client.h> +#include <languageclient/languageclientsettings.h> + 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 |
