Commit graph

4 commits

Author SHA1 Message Date
yiliang114
c1004d0e99 fix(lsp): improve C++/Java/Python language server support
Key changes:

1. Remove LspLanguageDetector — LSP is now fully config-driven via
   .lsp.json or extensions. No more auto-detected built-in presets
   that fail when the server binary is missing.

2. Add ensureDocumentOpen — send textDocument/didOpen before every
   document-level LSP request (definitions, references, hover,
   documentSymbol, implementations, prepareCallHierarchy, diagnostics,
   codeActions). This fixes the root cause of most methods returning
   empty results (Issue #2106, #1873).

3. Add retry mechanism for slow servers — when a freshly opened
   document yields empty results on non-TypeScript servers (jdtls,
   clangd, pylsp), wait 2s and retry once. This mirrors the existing
   retry logic in workspaceSymbols.

4. Handle LSP 3.17 WorkspaceSymbol format — location.range is now
   optional in normalizeSymbolResult, fixing jdtls workspace symbol
   responses that omit the range field.

5. Improve workspace symbol warmup — for non-TypeScript servers, open
   a workspace file before the first workspace/symbol request and
   retry on empty results after a warmup delay.

6. Track warmup-opened URIs — warmupTypescriptServer now returns the
   opened URI, which is registered with ensureDocumentOpen to prevent
   duplicate didOpen notifications.

Closes #2106, closes #1873

Made-with: Cursor
2026-03-21 01:27:00 +08:00
yiliang114
7ec79e6806 feat(lsp): support for loading lspServers configurations from extensions 2026-01-27 11:21:29 +08:00
yiliang114
8420386d14 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
2026-01-25 20:59:44 +08:00
yiliang114
d075574030 wip: lsp 2026-01-21 01:16:08 +08:00