-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Description
Problem
VS Code runs two TS servers for our JavaScript and TypeScript support:
-
Syntax Server. Use for basic syntax related operations, such as outline, auto closing tags, etc. Only loads the current file
-
Semantic server. Used for more advanced operations such as errors and intellisense. Requires loading the entire project
For larger projects, the semantic server can take time to load the entire project and start providing responses. While the project is loading, the user does not get any IntelliSense.
Here's the state of things today:
Stage | Syntax Operations (Outline) | Semantic Operations (IntelliSense) | Diagnostics |
---|---|---|---|
Loading | Full | None | None |
Loaded | Full | Full | Full |
Proposal
We'd like to explore improving the UX while a project is loading by letting the syntax server handle basic semantic operations until the project has been fully loaded:
Stage | Syntax Operations (Outline) | Semantic Operations (IntelliSense) | Diagnostics |
---|---|---|---|
Loading | Full | Partial | None |
Loaded | Full | Full | Full |
While loading is happening, we plan to use the syntax server to implement semantic operations such as hover and IntelliSense.
The key limitation of this approach is that the syntax server only knows about the current file, so it will not be able to provide complete results. For example, IntelliSense would only include suggestions from the current file and would not be able to support auto imports