Repository navigation
Description
Summary
.please/config.yml accepts lsp.<server>.command, but no code path uses it. The schema validates it (packages/format/src/config/schema.ts:36) and getServerCommand reads it (packages/lsp/src/config.ts:61). That function is only re-exported (packages/lsp/src/index.ts:1016). Both spawn sites call server.spawn(root) without it: packages/lsp/src/index.ts:338 and packages/code/src/cli.ts:141. A configured command is silently ignored and nothing is logged.
Why it matters
resolveNativeTypeScriptServer (packages/lsp/src/server/typescript.ts:159-182) finds a TypeScript 7 server only in fixed places:
tsrsnode_modules/typescriptat 7 or later- the
@typescript/nativealias (chore: add TypeScript 7 side-by-side via @typescript/native alias and detect it in the LSP resolver #153) @typescript/native-preview'stsgo- a global
tsrs
If none of these exist, it falls back to typescript-language-server and tsserver.
Some projects have to keep typescript below 6.1, because typescript-eslint 8.x peers on >=4.8.4 <6.1.0. eslint-plugin-sonarjs and @astrojs/check set similar caps. Those projects can install TS 7 only beside 6. If they use any alias name other than @typescript/native, or put the binary outside node_modules, they get tsserver, and there is no override. @typescript/native-preview is not a durable workaround either: its last publish was 7.0.0-dev.20260707.2.
The difference is large. In one single-file diagnostic run, the same TS2322 came back from both servers. tsgo --lsp --stdio peaked at about 72 MB and tsserver at about 459 MB.
Proposal
When lsp.<id>.command is set, spawn it and skip auto-detection for that server:
- spawn
command[0]withcommand.slice(1),cwd= the server root - resolve a relative
command[0]against the project root - log that a configured command is in use, the same way the native path logs
Using ... language server
Do this once in the spawn path, in LSPManager and code lsp, instead of in each server. Then every server gets the override, not only typescript. When the field is unset, resolution stays exactly as it is now.
lsp:
typescript:
command: ["node_modules/.bin/tsc7", "--lsp", "--stdio"]Alias status
@typescript/native is handled since #153 (merged 2026-11-22). It is not published yet: the npm latest of @pleaseai/code is still 0.1.16, from 2026-10-21. Other alias names would still need command.
Acceptance criteria
- With
lsp.typescript.commandset,code lspand the multiplexer spawn that command and log it. - Without
command, server resolution is unchanged (existingtypescript-nativetests still pass). - A unit test covers a configured command overriding detection, and a relative path resolving against the root.
-
apps/docs/content/docs/3.configuration/1.overview.mddocumentscommand.
Activity