Skip to content

Add way force TS Server to use a specific set of tsconfig/jsconfigs #33094

Open
@mjbvz

Description

@mjbvz

From microsoft/vscode#12463

Search Terms

  • tsconfig / jsconfig
  • tsserver

Problem

Some common project templates (such as angular) generate config file with names such as tsconfig.dev.json. The TS Server used by VS Code will not load this project because the file is not named tsconfig.json. We only load project files exactly named tsconfig.json

Feature Request

Allow users to configure a specific set one or more project config files that the TS Server should load, such as /Users/matb/project/test/tsconfig.dev.json. This could either be configured using a server command line flag or using the configure request in TS

How do we handle additional projects?

If specific project files have been configured, one proposal is that we only load those projects (and never fall back to loading additional projects). Using this approach, when a user opens a new file:

  • If that file is part of one of the configured projects, then open it inside the project
  • Otherwise load the file in the inferred/global project

As an alternative to this to better support multi-root workspaces in VS Code, we could instead only fall back to loading an additional project if that project is not under the roots of any of the configured projects. For example, if I configured /Users/matb/project/test/tsconfig.dev.json as the project to load, we should never load additional projects under: /Users/matb/project/test/** but could load ones from under /Users/matb/project/other/**

Metadata

Metadata

Assignees

No one assigned

    Labels

    RescheduledThis issue was previously scheduled to an earlier milestoneSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions