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

@@ -25,6 +25,7 @@
#include "pythonplugin.h"
#include "pythonconstants.h"
#include "pythoneditor.h"
#include "pythonlanguageclient.h"
#include "pythonproject.h"
@@ -71,6 +72,10 @@ public:
PythonPlugin::PythonPlugin()
{
m_instance = this;
LanguageClient::LanguageClientSettings::registerClientType({Constants::PYLS_SETTINGS_ID,
tr("Python Language Server"),
[]() { return new PyLSSettings; }});
}
PythonPlugin::~PythonPlugin()
@@ -102,7 +107,7 @@ void PythonPlugin::extensionsInitialized()
{
// Add MIME overlay icons (these icons displayed at Project dock panel)
QString imageFile = Utils::creatorTheme()->imageFile(Utils::Theme::IconOverlayPro,
Constants::FILEOVERLAY_PY);
::Constants::FILEOVERLAY_PY);
Core::FileIconProvider::registerIconOverlayForSuffix(imageFile, "py");
TaskHub::addCategory(PythonErrorTaskCategory, "Python", true);