( server: LspServerDefinition, session?: string, )
| 294 | } |
| 295 | |
| 296 | function resolveStartCommand( |
| 297 | server: LspServerDefinition, |
| 298 | session?: string, |
| 299 | ): string | null { |
| 300 | const launcher = server.launcher; |
| 301 | if (!launcher) return null; |
| 302 | const executable = resolveServerExecutable(server); |
| 303 | |
| 304 | if (launcher.startCommand) { |
| 305 | return formatCommand(launcher.startCommand); |
| 306 | } |
| 307 | if (launcher.command) { |
| 308 | return joinCommand(executable || launcher.command, launcher.args); |
| 309 | } |
| 310 | if (launcher.bridge) { |
| 311 | return buildAxsBridgeCommand(launcher.bridge, executable, session); |
| 312 | } |
| 313 | return null; |
| 314 | } |
| 315 | |
| 316 | export function getStartCommand(server: LspServerDefinition): string | null { |
| 317 | return resolveStartCommand(server); |
no test coverage detected