Introducing a new way to review your PRs.

Read the announcement

oraios / serena

A powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent

View on GitHub

13 documents · Updated Nov 16, 2026

docs / solidlsp-language-servers

SolidLSP language-server adapters

Overview

The concrete SolidLSP adapter catalog lives under src/solidlsp/language_servers/. Each file defines one built-in SolidLanguageServer subclass (or a small family around one adapter) that knows how to prepare its runtime dependency, construct the LSP launch command, customize initialize parameters, and handle server-specific startup notifications. Built-ins are selected through LanguageServerId.get_ls_class() in src/…/ls_config.py, which lazily imports adapters such as pyright_server.py, typescript_language_server.py, eclipse_jdtls.py, kotlin_language_server.py, vue_language_server.py, svelte_language_server.py, angular_language_server.py, and the many single-language adapters in the same directory.

Most adapters follow the same pattern: the SolidLanguageServer subclass calls super().__init__(..., language_id, solidlsp_settings) and overrides _create_dependency_provider() to return a provider. Providers come from src/…/dependency_provider.py: LanguageServerDependencyProviderSinglePath resolves one executable/JAR/script path and then turns it into a launch command, while LanguageServerDependencyProviderUvx runs pinned PyPI packages through uvx/uv tool run. The shared helpers in src/…/common.py add RuntimeDependency and RuntimeDependencyCollection for adapters that install npm packages, run setup commands, or download platform-specific archives into the adapter resource directory. common.py also centralizes build_npm_install_command(), verified archive extraction, platform filtering, and Unreal Engine ignored-directory helpers.

Major adapter families are:

Runtime state is written below each adapter's SolidLSP resources directory. The exact layout is adapter-specific: typescript_language_server.py installs into ts-lsp or a versioned ts-lsp-<typescript>-<typescript-language-server> directory; kotlin_language_server.py downloads into kotlin_language_server or a versioned directory and redirects IntelliJ idea.system.path into the project cache; eclipse_jdtls.py installs vscode-java VSIX and Gradle resources or uses an upstream JDTLS install when jdtls_path and lombok_path are set. User overrides are intentionally centralized: LanguageServerDependencyProviderBaseCommand supports ls_base_cmd, ls_path, ls_args, and ls_extra_args, while individual adapters add language-specific version/settings keys in their _custom_settings.

Initialization customization is adapter-specific and usually lives in _create_base_initialize_params() plus _start_server(). Examples include Pyright progress and log-message handlers in pyright_server.py, TypeScript progress and version handling in typescript_language_server.py, Deno workspace/configuration and Deno-specific notifications in deno_language_server.py, Kotlin workspace storage and progress handling in kotlin_language_server.py, and Java/JDTLS build-tool/runtime options in eclipse_jdtls.py. Directory filtering is similarly per adapter via is_ignored_dirname(): TypeScript ignores node_modules, dist, and build; Deno ignores node_modules, vendor, dist, and build; Vue/Svelte/Angular add framework build output such as .nuxt, .output, or companion-specific handling.

Dependency hashes are stored in src/…/downloaded_dependency_hashes.json. DownloadedDependencyHashDatabase loads that resource file, returns known SHA256 values during DownloadedDependency.download_to(), and in CI raises if a verified dependency URL is missing a hash. scripts/update_downloaded_dependency_hashes.py updates hashes for the adapters that opt into this database today: Eclipse JDTLS, EmmyLua, Erlang, Nextflow, Kotlin, and VB.NET. scripts/print_language_list.py prints the sorted values of LanguageServerId, so adding a built-in language to src/…/ls_config.py is reflected in generated project template language lists.

To add a new built-in language server, add a concrete adapter under src/solidlsp/language_servers/, choose an appropriate dependency provider model, define launch command and initialization behavior, and then wire the language into src/…/ls_config.py by adding a LanguageServerId value, source filename matcher, and get_ls_class() import branch. If the adapter downloads verified artifacts through DownloadedDependency, add/update its DependencyProvider.update_dep_hashes() and include it in scripts/update_downloaded_dependency_hashes.py; if it is exposed in templates, regenerate the language list with scripts/print_language_list.py.

Coupling

Risks

  • typescript_language_server.py, vue_language_server.py, svelte_language_server.py, and angular_language_server.py are tightly coupled around TypeScript plugin loading and language IDs. If .tsx/.jsx/framework file language IDs or plugin locations drift, definitions and symbols can be silently truncated or filtered out rather than failing loudly.
  • eclipse_jdtls.py pins internal VSIX paths (VsixResourcePaths) as well as artifact hashes. If DEFAULT_VSCODE_JAVA_VERSION is bumped without updating the JRE, Lombok, and Equinox launcher filenames, the VSIX can download successfully but JDTLS later fails with missing internal files.
  • kotlin_language_server.py has explicit comments warning that newer JetBrains Kotlin LSP versions expire quickly, so DEFAULT_KOTLIN_LSP_VERSION is intentionally held at the initial version. Changing it risks producing an adapter that installs correctly but becomes unusable after the upstream build expires.
  • DownloadedDependencyHashDatabase in src/…/dependency_provider.py treats unknown verified hashes as warnings outside CI but hard failures in CI. A local manual test of a changed DownloadedDependency may appear to work while CI fails unless src/…/downloaded_dependency_hashes.json is updated.