TypeScript/VTS: event-based indexing wait and no automatic typing acquisition (#1639)

* TypeScript/VTS: event-based indexing wait, no automatic typing acquisition

- Set disableAutomaticTypingAcquisition in initializationOptions (TS and VTS)
  so tsserver does not download type packages from the network during
  language server initialization.
- Replace the fixed 2-second wait before cross-file reference requests with
  $/progress-based indexing tracking: a pre-open hook arms the tracking
  (expect_indexing) before didOpen, then the request waits until indexing
  progress drains (wait_for_indexing), bounded by a configurable
  'indexing_timeout' (ls_specific_settings, default 30s). If tsserver does
  not start reporting progress within a 2-second grace period (the previous
  fixed wait), the request proceeds — so the fast path is never slower than
  before, while slow indexing is actually awaited instead of guessed at.
This commit is contained in:
bymebyu authored and GitHub committed 2026-07-03 11:38:53 +02:00
1 parent 4f4b862802
commit 81b1bc804d
5 files changed
+61 -5

No files matched your search

+1
View File
@@ -1000,6 +1000,7 @@ Supported settings:
| `typescript_version` | `5.9.3` | Override the bundled `typescript` npm package version Serena installs when `ls_path` is not set. |
| `typescript_language_server_version` | `5.1.3` | Override the bundled `typescript-language-server` npm package version Serena installs when `ls_path` is not set. |
| `npm_registry` | `null` | Override the npm registry Serena uses for the managed install. |
| `indexing_timeout` | `30.0` | Timeout in seconds for waiting on tsserver's `$/progress` project-indexing signal (both at startup and before the first cross-file reference query). If indexing does not complete within this window, Serena logs a warning and proceeds anyway. Increase it for very large projects. |
TypeScript supports [additional workspace folders](additional-workspace-folders) for cross-package
reference discovery. Configure `additional_workspace_folders` in `project.yml` to enable this feature.