microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.79k stars 29.11k forks source link

Allow relative paths in `typescript.tsserver.nodePath` #232113

Open mjames-c opened 3 days ago

mjames-c commented 3 days ago

Steps to Reproduce:

  1. Update workspace settings JSON typescript.tsserver.nodePath to point at a relative path to the workspace root (e.g. ./my-node-script.sh)
  2. Notice that the script isn't used for invoking tsserver (typescript plugin falls back to using VSCode's inbuilt node install)

The problem occurs because asAbsoluteWorkspacePath() expects that the path to the node path is prefixed with the workspace name.

I'd expect this property to behave the same as typescript.tsdk which doesn't require the workspace name to prefixed to the relative path passed to it.

https://github.com/microsoft/vscode/blob/fe997185b5e6db94693ed6ef5456cfa4e8211edf/extensions/typescript-language-features/src/utils/relativePathResolver.ts#L9-L20

vs-code-engineering[bot] commented 3 days ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!