forked from qt-creator/qt-creator
Python: globalize Python language server settings
Change-Id: I84fcee6462064f0c788492fcfa12a77379af2bd7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -319,6 +319,7 @@ public:
|
||||
bool m_autoRequestCodeActions = true;
|
||||
QTimer m_shutdownTimer;
|
||||
LanguageServerProtocol::ClientInfo m_clientInfo;
|
||||
QJsonValue m_configuration;
|
||||
};
|
||||
|
||||
Client::Client(BaseClientInterface *clientInterface)
|
||||
@@ -1303,8 +1304,10 @@ void Client::projectClosed(ProjectExplorer::Project *project)
|
||||
|
||||
void Client::updateConfiguration(const QJsonValue &configuration)
|
||||
{
|
||||
if (d->m_dynamicCapabilities.isRegistered(DidChangeConfigurationNotification::methodName)
|
||||
.value_or(true)) {
|
||||
d->m_configuration = configuration;
|
||||
if (reachable() && !configuration.isNull()
|
||||
&& d->m_dynamicCapabilities.isRegistered(DidChangeConfigurationNotification::methodName)
|
||||
.value_or(true)) {
|
||||
DidChangeConfigurationParams params;
|
||||
params.setSettings(configuration);
|
||||
DidChangeConfigurationNotification notification(params);
|
||||
@@ -1915,11 +1918,7 @@ void ClientPrivate::initializeCallback(const InitializeRequest::Response &initRe
|
||||
}
|
||||
}
|
||||
|
||||
if (const BaseSettings *settings = LanguageClientManager::settingForClient(q)) {
|
||||
const QJsonValue configuration = settings->configuration();
|
||||
if (!configuration.isNull())
|
||||
q->updateConfiguration(configuration);
|
||||
}
|
||||
q->updateConfiguration(m_configuration);
|
||||
|
||||
m_tokenSupport.clearTokens(); // clear cached tokens from a pre reset run
|
||||
for (TextEditor::TextDocument *doc : m_postponedDocuments)
|
||||
|
||||
Reference in New Issue
Block a user