SolidLSP: Apply InitializeParamsBuilder to Angular/Svelte/Vue main servers

The AngularLanguageServer, SvelteLanguageServer and VueLanguageServer
classes (the primary ngserver/svelte-language-server/vue-language-server
processes, all direct SolidLanguageServer subclasses) still hand-rolled
their initialize params via _get_initialize_params, bypassing the builder.
Only their companion *TypeScript* server classes (AngularTypeScriptServer,
etc.) had been migrated previously.

Convert the three main classes to _create_base_initialize_params so their
processId/rootPath/rootUri/clientInfo/workspaceFolders are now supplied
centrally by the InitializeParamsBuilder, consistent with every other
language server. Server-specific initializationOptions (ngProbeLocations,
svelte plugin configuration, Vue hybridMode) are preserved.

Also update the Angular companion-cleanup test to monkeypatch the renamed
_create_base_initialize_params (it patched the now-removed
_get_initialize_params).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dominik JainandClaude Opus 4.8 authored and Dominik Jain committed 2026-07-03 15:01:16 +02:00
1 parent fd91dd10f6
commit cb7ba3f905
4 files changed
+14 -46

No files matched your search

@@ -335,10 +335,10 @@ class TestAngularStartupCleanup:
def boom(*_args: object, **_kwargs: object) -> dict:
raise RuntimeError("simulated ngserver init failure")
# _get_initialize_params runs after both companions and ngserver have
# been spawned — exactly the failure window the cleanup wrapper
# _create_base_initialize_params runs after both companions and ngserver
# have been spawned — exactly the failure window the cleanup wrapper
# protects against.
monkeypatch.setattr(ls, "_get_initialize_params", boom)
monkeypatch.setattr(ls, "_create_base_initialize_params", boom)
try:
with pytest.raises(RuntimeError, match="simulated ngserver init"):