Add TypeScript server runtime controls - #63
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Re-opening.. Codex decided properly stacking was impossible so closing was a better direction... My bad... |
|
Would it be possible to add automatic PATH lookup to this (like #45)? My use case is a Nix dev shell, loaded through direnv, which provides TypeScript 7 through |
|
Added in kjanat/zed-tsgo@8c6f34b. The resolution order is now:
The PATH step resolves through Zed's worktree shell environment, so a direnv-loaded Nix shell is covered, and the executable is launched directly as A project-local install still wins over PATH, so a pinned |
Note
Stack 3 of 4. Depends on #62, which depends on #61.
Until the lower layers merge, GitHub includes them in this PR's aggregate diff. The incremental change for this layer is commit
307be82.Summary
lsp.typescript-ls.binary.path, arguments, and environment variables.tsc,tsc.js, andtsc.exepaths as direct server launchers.bin/tsclauncher.server.pprofDir,server.args, andserver.envlaunch controls.server.goMemLimitsupport through the Go runtime'sGOMEMLIMITenvironment variable.Motivation
TypeScript's native server exposes useful runtime diagnostics and Go memory controls, while advanced installations need explicit command, argument, and environment overrides. These options make those capabilities available without requiring extension releases for every new server flag.
Environment precedence
From lowest to highest:
server.envserver.goMemLimitbinary.envExplicit
binary.argumentsreplace extension-generated arguments. Otherwise the extension supplies--lsp --stdioplus configured runtime arguments.Validation
cargo fmt --all -- --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked --all-targets(14 tests)markdownlint-cli2 README.mdtombi lint extension.toml Cargo.tomlgit diff --check