| 24 | } |
| 25 | |
| 26 | newlsp::Client *LSPClientManager::get(const newlsp::ProjectKey &key) |
| 27 | { |
| 28 | if (!key.isValid()) |
| 29 | return nullptr; |
| 30 | |
| 31 | if (clientHash.contains(key)) { |
| 32 | qApp->metaObject()->invokeMethod(clientHash[key], "selectLspServer", Q_ARG(const newlsp::ProjectKey &, key)); |
| 33 | } else { |
| 34 | auto client = new newlsp::Client(); |
| 35 | qApp->metaObject()->invokeMethod(client, "selectLspServer", Q_ARG(const newlsp::ProjectKey &, key)); |
| 36 | qApp->metaObject()->invokeMethod(client, "initRequest"); |
| 37 | clientHash.insert(key, client); |
| 38 | } |
| 39 | |
| 40 | return clientHash[key]; |
| 41 | } |
| 42 | |
| 43 | QColor LSPClientManager::highlightColor(const QString &langId, lsp::SemanticTokenType::type_value token) |
| 44 | { |
no test coverage detected