feat(lsp): Removes built-in LSP configuration options and improves configuration loading mechanism

- remove configuration options such as lsp.enabled, lsp.allowed, lsp.excluded, etc. from settings.json schema
- Delete lspSettingsSchema.ts files and associated JSON schema definitions
- Removed VS Code settings loading function, no longer merge. vscode/settings.json configuration
- Updated LSP documentation to reflect new configurations and experimental flags
-remove allow/exclude parameters in NativeLspService constructor
- Create new LspConfigLoader classes to handle LSP configuration loading and merging
- Updated debug guide to match the new configuration mechanism
- Simplify loadCliConfig functions, remove startLsp options
- Reconstruct the configuration loading process to remove duplicate configuration merge logic
- Add LspConfigLoader classes to implement configuration parsing and merging functions
This commit is contained in:
yiliang114 2026-01-25 20:59:44 +08:00
parent 45e947dcbc
commit 8420386d14
33 changed files with 3064 additions and 3907 deletions

View file

@ -288,20 +288,9 @@ If you are experiencing performance issues with file searching (e.g., with `@` c
> [!warning]
> **Experimental Feature**: LSP support is currently experimental and disabled by default. Enable it using the `--experimental-lsp` command line flag.
Language Server Protocol (LSP) settings for code intelligence features like go-to-definition, find references, and diagnostics. See the [LSP documentation](../features/lsp) for more details.
Language Server Protocol (LSP) provides code intelligence features like go-to-definition, find references, and diagnostics.
| Setting | Type | Description | Default |
| --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `lsp.enabled` | boolean | Enable/disable LSP support. Has no effect unless `--experimental-lsp` is provided. | `false` |
| `lsp.autoDetect` | boolean | Automatically detect and start language servers based on project files. | `true` |
| `lsp.serverTimeout` | number | LSP server startup timeout in milliseconds. | `10000` |
| `lsp.allowed` | array of strings | An allowlist of LSP servers to allow. Empty means allow all detected servers. | `[]` |
| `lsp.excluded` | array of strings | A denylist of LSP servers to exclude. A server listed in both is excluded. | `[]` |
| `lsp.languageServers` | object | Custom language server configurations. See the [LSP documentation](../features/lsp#custom-language-servers) for configuration format. | `{}` |
> [!note]
>
> **Security Note for LSP servers:** LSP servers run with your user permissions and can execute code. They are only started in trusted workspaces by default. You can configure per-server trust requirements in the `.lsp.json` configuration file.
LSP server configuration is done through `.lsp.json` files in your project root directory, not through `settings.json`. See the [LSP documentation](../features/lsp) for configuration details and examples.
#### security