microsoft / microsoft/TypeScript
Add way force TS Server to use a specific set of tsconfig/jsconfigs
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
From https://github.com/microsoft/vscode/issues/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/**
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il comportamento di caricamento dei progetti di TS Server e la richiesta configure menzionata nell’issue. Definisci come vengono selezionati i file tsconfig/jsconfig configurati esplicitamente, come i file al di fuori di questi usano progetti inferred o globali e come deve comportarsi il fallback multi-root proposto; il lavoro è completato quando queste regole sono implementate e verificate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- compilers, developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100