Skip to content

Resolve the tsc binary in our own cmd function - #5

Merged
NullVoxPopuli merged 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:tsc-cmd-resolution
Aug 25, 2026
Merged

Resolve the tsc binary in our own cmd function#5
NullVoxPopuli merged 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:tsc-cmd-resolution

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Fixes the content-mapper tsc client failing to spawn (Spawning language server with cmd: { "tsc", "--lsp", "--stdio" } failed) after a recent nvim-lspconfig update.

nvim-lspconfig moved the workspace binary resolution for tsc into its default root_dir function, cached per root in a file-local bin_cache. The cmd function reads only that cache. Our override from #4 replaces root_dir with the content-mapper project detection, so the cache never fills and cmd falls back to a bare tsc that is not on PATH.

This resolves <root>/node_modules/.bin/tsc in a self-contained cmd function, so the override no longer depends on lspconfig internals. Verified headlessly against ember-content-mapper's example app: the client attaches, a clean .gts has zero diagnostics, and hover over a component returns its type.

🤖 Generated with Claude Code

nvim-lspconfig d217766 moved the tsc binary resolution into its default
root_dir function, cached per root. Our content-mapper override replaces
root_dir, so the cache stays empty and the client fell back to a bare
'tsc' that is not on PATH. Resolve <root>/node_modules/.bin/tsc in a
self-contained cmd function instead of depending on lspconfig internals.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NullVoxPopuli
NullVoxPopuli merged commit 40e2027 into NullVoxPopuli:main Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants