mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 20:17:42 +00:00
feat: Add Angular, HTML, and SCSS / Sass language servers (#1439)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Pavlo Basanets <Pavlo_Basanets@epam.com>
This commit is contained in:
53 files changed
+3280
-22
No files matched your search
@@ -227,8 +227,13 @@ ls_specific_settings:
|
||||
|
||||
This is supported by all language servers deriving their dependency provider from `LanguageServerDependencyProviderSinglePath`,
|
||||
and by some additional wrappers that explicitly expose `ls_path`.
|
||||
Common examples include: `ansible`, `bash`, `clojure`, `cpp`, `cpp_ccls`, `hlsl`, `kotlin`, `lean4`, `luau`, `markdown`, `php`,
|
||||
`php_phpactor`, `python`, `rust`, `solidity`, `systemverilog`, `toml`, `typescript`, and `yaml`.
|
||||
Common examples include: `ansible`, `bash`, `clojure`, `cpp`, `cpp_ccls`, `hlsl`, `html`, `kotlin`, `lean4`, `luau`, `markdown`, `php`,
|
||||
`php_phpactor`, `python`, `rust`, `scss`, `solidity`, `systemverilog`, `toml`, `typescript`, and `yaml`.
|
||||
|
||||
Note: `angular` does **not** support `ls_path` — the Angular language server is part of a multi-process orchestration
|
||||
(`ngserver` plus a companion TypeScript language server with the `@angular/language-service` plugin and an HTML
|
||||
companion) where the dependency layout matters; use the version overrides documented in the Angular section below
|
||||
to pin specific releases of the bundled stack.
|
||||
|
||||
If a language server supports `ls_path`, setting it bypasses Serena's managed download or install for that server.
|
||||
In that case, any server-specific version or registry settings only apply when `ls_path` is not set.
|
||||
@@ -243,6 +248,36 @@ Supported settings:
|
||||
|---|---|---|
|
||||
| `al_extension_version` | `18.0.2242655` | Override the AL VS Code extension version Serena downloads from the VS Code Marketplace. |
|
||||
|
||||
#### Angular
|
||||
|
||||
Serena uses `@angular/language-server` (`ngserver`) for the `angular` language key, orchestrated together with a
|
||||
companion `typescript-language-server` (with `@angular/language-service` loaded as a tsserver plugin) and a
|
||||
companion `vscode-html-language-server` for `.html` `documentSymbol`. This is an **experimental** language and
|
||||
must be explicitly listed in `project.yml`; it is not auto-detected.
|
||||
|
||||
**Project requirements:**
|
||||
|
||||
- The project itself must have `@angular/core` installed (i.e. `npm install` must have been run in the project root,
|
||||
or in a workspace root above it for monorepo layouts). Without it, `ngserver` reports every file as "not in an
|
||||
Angular project" and template-aware features silently return empty.
|
||||
- A `tsconfig.json` must be reachable at or above any opened `.ts` file.
|
||||
- Do **not** also list `typescript` or `html` in `languages` when `angular` is active — Angular subsumes both
|
||||
for `.ts` / `.html` files. SCSS is **not** subsumed; list `scss` separately if needed.
|
||||
|
||||
Supported settings:
|
||||
|
||||
| Setting | Default | Description |
|
||||
|---|---|---|
|
||||
| `angular_language_server_version` | `21.2.10` | Override the bundled `@angular/language-server` npm package version Serena installs. |
|
||||
| `angular_language_service_version` | `21.2.10` | Override the bundled `@angular/language-service` tsserver plugin version. |
|
||||
| `typescript_version` | `5.9.3` | Override the bundled `typescript` npm package version. Falls back to `ls_specific_settings.typescript.typescript_version` if unset. |
|
||||
| `typescript_language_server_version` | `5.1.3` | Override the bundled `typescript-language-server` version. Falls back to `ls_specific_settings.typescript.typescript_language_server_version` if unset. |
|
||||
| `npm_registry` | `null` | Override the npm registry Serena uses for the managed install. Falls back to `ls_specific_settings.typescript.npm_registry` if unset. |
|
||||
|
||||
Notes:
|
||||
- The HTML companion (`vscode-html-language-server`) is configured via `ls_specific_settings.html` — see the HTML section below.
|
||||
- `ls_path` is not supported (see note above the AL section).
|
||||
|
||||
#### Ansible
|
||||
|
||||
Serena uses `@ansible/ansible-language-server` for the `ansible` language key.
|
||||
@@ -496,6 +531,25 @@ ls_specific_settings:
|
||||
renameSourceFolders: ["src", "lib"]
|
||||
```
|
||||
|
||||
#### HTML
|
||||
|
||||
Serena uses `vscode-html-language-server` from Microsoft's `vscode-langservers-extracted` npm package for the
|
||||
`html` language key. **Experimental** — must be explicitly listed in `project.yml`; not auto-detected. The HTML
|
||||
LSP returns in-file element / id symbols via `documentSymbol`; cross-file `definition` / `references` are not
|
||||
meaningful for HTML and are not exposed.
|
||||
|
||||
This same language server is also used as a tertiary companion by the Angular language server (see the Angular
|
||||
section), since `ngserver` does not implement `textDocument/documentSymbol` for `.html` files.
|
||||
|
||||
Supported settings:
|
||||
|
||||
| Setting | Default | Description |
|
||||
|---|---|---|
|
||||
| `ls_path` | managed install | Override the `vscode-html-language-server` executable path. |
|
||||
| `vscode_langservers_package` | `vscode-langservers-extracted` | npm package providing the binary. Set to `@t1ckbase/vscode-langservers-extracted` (or any other source) to use the actively-maintained 2026 fork. |
|
||||
| `vscode_langservers_version` | `4.10.0` | Override the npm package version Serena installs when `ls_path` is not set. |
|
||||
| `npm_registry` | `null` | Override the npm registry Serena uses for the managed install. |
|
||||
|
||||
#### Java (`eclipse.jdt.ls`)
|
||||
|
||||
Java support has two installation modes:
|
||||
@@ -790,6 +844,26 @@ Supported settings:
|
||||
| `on_stale_lock` | `auto-clean` | How Serena handles stale Metals H2 database locks. Supported values: `auto-clean`, `warn`, `fail`. |
|
||||
| `log_multi_instance_notice` | `true` | Log a notice when another Metals instance is detected. |
|
||||
|
||||
#### SCSS / Sass / CSS
|
||||
|
||||
Serena uses [`some-sass-language-server`](https://github.com/wkillerud/some-sass) for the `scss` language key.
|
||||
**Experimental** — must be explicitly listed in `project.yml`; not auto-detected. Some Sass was chosen over the
|
||||
generic `vscode-css-language-server` because it provides full workspace-wide `@use` / `@forward` go-to-definition
|
||||
and find-references for variables, mixins, functions, and placeholders.
|
||||
|
||||
Handles `.scss`, `.sass`, and `.css`. The three are dispatched by the LSP language id (`scss`, `sass`, `css`) and
|
||||
share the same engine; CSS feature toggles default to off upstream and Serena flips them on at startup so that
|
||||
plain CSS gets symbols, definitions, references, hover, and completion. Lint diagnostics are deliberately left
|
||||
off (the rules are opinionated about vendor prefixes / empty rules / etc.); only syntax-level diagnostics surface.
|
||||
|
||||
Supported settings:
|
||||
|
||||
| Setting | Default | Description |
|
||||
|---|---|---|
|
||||
| `ls_path` | managed install | Override the `some-sass-language-server` executable path. |
|
||||
| `some_sass_version` | `2.3.8` | Override the npm package version Serena installs when `ls_path` is not set. |
|
||||
| `npm_registry` | `null` | Override the npm registry Serena uses for the managed install. |
|
||||
|
||||
#### Solidity
|
||||
|
||||
Serena uses `@nomicfoundation/solidity-language-server` for Solidity support.
|
||||
|
||||
@@ -142,10 +142,13 @@ Only the language servers listed below download or install additional dependenci
|
||||
|
||||
### npm Package Installs
|
||||
|
||||
- **Angular**: `@angular/language-server`, `@angular/language-service`, plus `typescript` and `typescript-language-server`
|
||||
- **Ansible**: `@ansible/ansible-language-server`
|
||||
- **Bash**: `bash-language-server`
|
||||
- **Elm**: `@elm-tooling/elm-language-server`
|
||||
- **HTML**: `vscode-langservers-extracted` (provides `vscode-html-language-server`)
|
||||
- **PHP (`intelephense`)**: `intelephense`
|
||||
- **SCSS / Sass / CSS**: `some-sass-language-server`
|
||||
- **Solidity**: `@nomicfoundation/solidity-language-server`
|
||||
- **TypeScript**: `typescript` and `typescript-language-server`
|
||||
- **Vue**: `@vue/language-server`, plus `typescript` and `typescript-language-server`
|
||||
|
||||
Reference in new issue
Block a user