mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-15 06:16:18 +00:00
Support ls_args and ls_extra_args centrally in LanguageServerDependencyProviderBaseCommand
* ls_args overrides the internal command builder, fully defining the arguments * ls_extra_args appends additional arguments to the launch command
This commit is contained in:
1 parent
e93bbeedad
commit
60abdd5297
3 files changed
+53
-17
No files matched your search
@@ -216,31 +216,39 @@ ls_specific_settings:
|
||||
```
|
||||
|
||||
(override-ls-path)=
|
||||
#### Overriding the Language Server Path
|
||||
#### Customizing the Language Server Launch Command
|
||||
|
||||
Most of Serena's language servers, particularly those that use a single core path for the language server (e.g. the main executable),
|
||||
support overriding that path via the `ls_path` setting.
|
||||
Therefore, if you have installed the language server yourself and want to use your installation
|
||||
instead of Serena's managed installation, you can set the `ls_path` setting as follows:
|
||||
Most of Serena's language servers construct the command that launches the language server process from
|
||||
a *base command* or a *core dependency*.
|
||||
For these language servers, the following settings can be used to customize the launch command:
|
||||
|
||||
| Setting | Description |
|
||||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `ls_path` (string) | overrides the path of the language server's core dependency (e.g. its executable or a JAR file). Use this if you have installed the language server yourself and want Serena to use your installation instead of its managed installation. |
|
||||
| `ls_args` (list) | overrides the internal command construction completely and simply adds `ls_args` to the base command |
|
||||
| `ls_extra_args` (list) | a list of additional arguments to append to the launch command |
|
||||
|
||||
* If you set `ls_args`, the internal command construction (which may do more than to append arguments to a base command) is bypassed.
|
||||
You can define the full launch command by providing both `ls_path` and `ls_args`.
|
||||
* If `ls_args` is not set, the internal command construction (which sets default arguments) is applied, and you can use `ls_path` to override the path of the core dependency.
|
||||
* `ls_extra_args` is always appended to the end of the launch command.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
ls_specific_settings:
|
||||
<language>:
|
||||
ls_path: "/path/to/language-server"
|
||||
ls_extra_args: ["--log-level=debug"]
|
||||
```
|
||||
|
||||
This is supported by all language servers deriving their dependency provider from `LanguageServerDependencyProviderSinglePath`,
|
||||
and by some additional wrappers that explicitly expose `ls_path`.
|
||||
These settings are supported by all language servers whose dependency provider derives from
|
||||
`LanguageServerDependencyProviderBaseCommand`, and `ls_path` is additionally exposed by some wrappers explicitly.
|
||||
Common examples include: `ansible`, `bash`, `bsl`, `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.
|
||||
If `ls_path` is set, Serena's managed download or install is bypassed for that language server.
|
||||
In that case, any server-specific version or registry settings do not apply.
|
||||
|
||||
#### AL
|
||||
|
||||
|
||||
Reference in new issue
Block a user