Python: add python specific language client settings

Change-Id: I1b9a194f32f3f13381954539229b02e03e3af058
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-12-13 15:30:21 +01:00
parent ee4ed51a57
commit 7f4342b687
4 changed files with 176 additions and 9 deletions

View File

@@ -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