forked from qt-creator/qt-creator
LanguageClient: add send configuration helper
Change-Id: If078a0354b86ca3dba5fceec94ce266424fe0c99 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -996,6 +996,17 @@ void Client::projectClosed(ProjectExplorer::Project *project)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::updateConfiguration(const QJsonValue &configuration)
|
||||||
|
{
|
||||||
|
if (m_dynamicCapabilities.isRegistered(DidChangeConfigurationNotification::methodName)
|
||||||
|
.value_or(true)) {
|
||||||
|
DidChangeConfigurationParams params;
|
||||||
|
params.setSettings(configuration);
|
||||||
|
DidChangeConfigurationNotification notification(params);
|
||||||
|
sendContent(notification);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Client::setSupportedLanguage(const LanguageFilter &filter)
|
void Client::setSupportedLanguage(const LanguageFilter &filter)
|
||||||
{
|
{
|
||||||
m_languagFilter = filter;
|
m_languagFilter = filter;
|
||||||
|
@@ -165,6 +165,7 @@ public:
|
|||||||
ProjectExplorer::Project *project() const;
|
ProjectExplorer::Project *project() const;
|
||||||
virtual void projectOpened(ProjectExplorer::Project *project);
|
virtual void projectOpened(ProjectExplorer::Project *project);
|
||||||
virtual void projectClosed(ProjectExplorer::Project *project);
|
virtual void projectClosed(ProjectExplorer::Project *project);
|
||||||
|
void updateConfiguration(const QJsonValue &configuration);
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
|
void requestCodeActions(const LanguageServerProtocol::DocumentUri &uri,
|
||||||
|
Reference in New Issue
Block a user