Skip to content

Switch copilot-lsp-typescript to launch TypeScript LSP via npx#57

Merged
bgrainger merged 2 commits into
masterfrom
copilot/update-typescript-server-command
May 22, 2026
Merged

Switch copilot-lsp-typescript to launch TypeScript LSP via npx#57
bgrainger merged 2 commits into
masterfrom
copilot/update-typescript-server-command

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

This updates the published TypeScript Copilot LSP convention to invoke the server through npx instead of calling typescript-language-server directly. The change aligns the convention’s launch shape with the requested command/arg form while preserving the existing extension mapping.

  • Convention config update

    • In conventions/copilot-lsp-typescript/convention.yml, changed the typescript server:
      • command from typescript-language-servernpx
      • args from [--stdio][-y, typescript-language-server, --stdio]
    • Kept fileExtensions unchanged (.ts, .tsx, .js, .jsx), per scope.
  • Resulting config shape

    typescript:
      command: npx
      args: [-y, typescript-language-server, --stdio]
      fileExtensions:
        .ts: typescript
        .tsx: typescriptreact
        .js: javascript
        .jsx: javascriptreact
Original prompt

Update conventions/copilot-lsp-typescript/convention.yml in Faithlife/CodingGuidelines so that the typescript server uses npx instead of invoking typescript-language-server directly.

Current YAML in conventions/copilot-lsp-typescript/convention.yml:

  • command: typescript-language-server
  • args: [--stdio]
  • file extensions currently include .ts, .tsx, .js, and .jsx

Requested target behavior is the YAML equivalent of this JSON snippet:

"typescript": {
  "command": "npx",
  "args": ["-y", "typescript-language-server", "--stdio"],
  "fileExtensions": {
    ".ts": "typescript",
    ".tsx": "typescript"
  }
}

Please make the repository change as follows:

  • In conventions/copilot-lsp-typescript/convention.yml, change the typescript server command from typescript-language-server to npx.
  • Change the args to [-y, typescript-language-server, --stdio] in valid YAML list form.
  • Preserve the existing convention structure and formatting style as much as practical.

Important:

  • Do not change the fileExtensions mapping unless the repository’s existing convention or surrounding files make that necessary. The user’s primary request is to run npx instead of typescript-language-server directly.
  • Do not switch to typescript-language-server@latest unless there is a strong repository-specific reason already documented in this repo.
  • If there is a local README or consumer-facing documentation for this convention that should be updated to reflect the command change, include that update in the PR as well.

After making the change, open a pull request with a concise title describing the switch to launching the TypeScript LSP through npx.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: ```

"typescript": {
  "command": "npx",
  "args": ["-y", "typescript-language-server", "--stdio"],
  "fileExtensions": {
    ".ts": "typescript",
    ".tsx": "typescript"
  }
open a new PR to change this to the YAML equivalent of the pasted content so that it runs npx instead of typescript-language-server directly

should we also use `npx -y typescript-language-server@latest --stdio`??

Assistant: I’m waiting for your confirmation on the pull request creation request; once you accept or decline it, I can continue, and my recommendation is **use `npx -y typescript-language-server --stdio`**, not `@latest`, unless you specifically want unpinned auto-upgrades.


This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update TypeScript server command to use npx Switch copilot-lsp-typescript to launch TypeScript LSP via npx May 20, 2026
Copilot AI requested a review from bgrainger May 20, 2026 22:08
@bgrainger bgrainger marked this pull request as ready for review May 21, 2026 00:18
@bgrainger bgrainger requested a review from travisbader May 21, 2026 00:18
Copy link
Copy Markdown
Member

@bgrainger bgrainger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should also add @latest but this is an improvement over current IMO.

@bgrainger bgrainger merged commit df0f5cd into master May 22, 2026
4 checks passed
@bgrainger bgrainger deleted the copilot/update-typescript-server-command branch May 22, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants