Commit Graph

5 Commits

Author SHA1 Message Date
adam2am
c01b21d0f8 fix(lsp): improve isServerInstalled for custom server configs (#282) 2025-12-29 10:22:38 +09:00
Sisyphus
4d66ea9730 fix(lsp): improve error messages when LSP server is not installed (#305)
Previously, when an LSP server was configured but not installed, the error
message said "No LSP server configured" which was misleading. Now the
error message distinguishes between:

1. Server not configured at all
2. Server configured but not installed (with installation hints)

The new error messages include:
- Clear indication of whether server is configured vs installed
- Installation commands for each built-in server
- Supported file extensions
- Configuration examples for custom servers

Fixes #304

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-28 17:38:23 +09:00
YeonGyu-Kim
9e490d311f feat(lsp): sync with OpenCode LSP implementation
- Add 50+ extension mappings to EXT_TO_LANG (Clojure, Erlang, F#, Haskell, Scala, OCaml, etc.)
- Add missing BUILTIN_SERVERS: Biome, Oxlint, ty (Python), FSharp, Terraform-ls
- Improve isServerInstalled() to check node_modules/.bin, ~/.config/opencode/bin paths
- Add Windows .exe extension support for command detection
- Fix GitHub issue #118 - LSP servers not being detected

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-20 13:58:07 +09:00
YeonGyu-Kim
81869ccaac feat(lsp): add oh-my-opencode.json config support with priority
Config file priority (high to low):
1. ./.opencode/oh-my-opencode.json (project)
2. ~/.config/opencode/oh-my-opencode.json (user)
3. ~/.config/opencode/opencode.json (opencode)
4. builtin servers

LSP servers sorted by source then priority field (higher = preferred)
2025-12-04 21:57:18 +09:00
YeonGyu-Kim
7090fca0fd feat(lsp): add LSP tools integration with workspace/configuration support
- Add 7 LSP tools: hover, goto_definition, find_references, document_symbols, workspace_symbols, diagnostics, servers
- Support multiple LSP servers: typescript, gopls, pyrefly, basedpyright, ruff, rust-analyzer, clangd, sourcekit-lsp, ruby-lsp
- Read LSP config from opencode.json with disabled server support
- Handle server requests: workspace/configuration, client/registerCapability, window/workDoneProgress/create
- Send workspace/didChangeConfiguration after initialized for basedpyright compatibility
- Uint8Array-based buffer for reliable LSP message parsing
2025-12-04 21:54:02 +09:00