Commit 0a44f370 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

group together startup error message

it looks more consistent, if this is one message
it is only one error
parent 1f0409d0
......@@ -724,12 +724,13 @@ private:
server.reset(new LSPClientServer(cmdline, root, realLangId, serverConfig.value(QStringLiteral("initializationOptions")), folders));
connect(, &LSPClientServer::stateChanged, this, &self_type::onStateChanged, Qt::UniqueConnection);
if (!server->start()) {
showMessage(i18n("Failed to start server: %1", cmdline.join(QLatin1Char(' '))), KTextEditor::Message::Error);
auto url = serverConfig.value(QStringLiteral("url")).toString();
QString errorMessage = i18n("Failed to start server: %1", cmdline.join(QLatin1Char(' ')));
const auto url = serverConfig.value(QStringLiteral("url")).toString();
if (!url.isEmpty()) {
showMessage(i18n("Please check your PATH for the binary"), KTextEditor::Message::Error);
showMessage(i18n("See also %1 for installation or details", url), KTextEditor::Message::Error);
errorMessage += QStringLiteral("\n") + i18n("Please check your PATH for the binary");
errorMessage += QStringLiteral("\n") + i18n("See also %1 for installation or details", url);
showMessage(errorMessage, KTextEditor::Message::Error);
} else {
showMessage(i18n("Started server %2: %1", cmdline.join(QLatin1Char(' ')), serverDescription(,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment