setting from pyls trismit
| 138 | |
| 139 | // setting from pyls trismit |
| 140 | QProcess *createJSServ(const newlsp::ProjectKey &key) |
| 141 | { |
| 142 | lspServOut << "create js language server," << qApp->thread() << QThread::currentThread(); |
| 143 | if (key.language != newlsp::JS) |
| 144 | return nullptr; |
| 145 | |
| 146 | QString jsServerInstallPath = CustomPaths::lspRuntimePath(QString::fromStdString(key.language)); |
| 147 | RemoteChecker::instance().checkJSServer(jsServerInstallPath); |
| 148 | |
| 149 | QString nodePath = jsServerInstallPath + "/node_modules/node/bin/node"; |
| 150 | QString serverPath = jsServerInstallPath + "/node_modules/.bin/typescript-language-server"; |
| 151 | if (!QFileInfo::exists(nodePath) || !QFileInfo::exists(serverPath)) { |
| 152 | return nullptr; |
| 153 | } |
| 154 | |
| 155 | auto proc = new QProcess(); |
| 156 | proc->setProgram(nodePath); |
| 157 | proc->setArguments({ serverPath, "--stdio" }); |
| 158 | |
| 159 | return proc; |
| 160 | } |
| 161 | |
| 162 | void selectLspServer(const QJsonObject ¶ms) |
| 163 | { |
nothing calls this directly
no test coverage detected