Skip to content

add tsserver.fallbackPath to initialization options #831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cdmistman
Copy link
Contributor

In order to support the broad variety of projects that replit users encounter, we at replit have been explicitly passing the typescript package from nixpkgs to typescript-language-server since April of last year. This has the unfortunate side-effect of not using the tsserver that's available in the user's workspace, which means the user may get inaccurate results in their completions.

This PR introduces a new option to initializationOptions.tsserver, fallbackPath. It has similar semantics to initializationOptions.tsserver.path, but is checked if

  1. typescript passed via initializationOptions.tsserver.path is absent or invalid
  2. typescript available via the workspace is absent or invalid

i've tested that this works on Replit

@rchl rchl merged commit 3558ed8 into typescript-language-server:master Dec 9, 2023
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