| 70 | } |
| 71 | |
| 72 | LSPClientPlugin::LSPClientPlugin(QObject *parent) |
| 73 | : KTextEditor::Plugin(parent) |
| 74 | , m_settingsPath(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + QStringLiteral("/lspclient")) |
| 75 | , m_defaultConfigPath(QUrl::fromLocalFile(m_settingsPath + QStringLiteral("/settings.json"))) |
| 76 | , m_debugMode(debug) |
| 77 | { |
| 78 | // ensure settings path exist, for e.g. local settings.json |
| 79 | QDir().mkpath(m_settingsPath); |
| 80 | |
| 81 | // ensure we don't spam the user with debug messages per default, do this just once |
| 82 | if (!oldCategoryFilter) { |
| 83 | oldCategoryFilter = QLoggingCategory::installFilter(myCategoryFilter); |
| 84 | } |
| 85 | |
| 86 | // apply our config |
| 87 | readConfig(); |
| 88 | } |
| 89 | |
| 90 | LSPClientPlugin::~LSPClientPlugin() = default; |
| 91 | |