opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(lsp): fix bun-based LSP server auto-installation

Open AHaldner opened this issue 1 week ago • 2 comments

Summary

Fixes auto-installation of bun-based LSP servers (Svelte, Astro, Vue, Pyright, etc.) that were failing silently.

Issues

  1. Using bun install <pkg> instead of bun add <pkg> - install doesn't add new packages
  2. Using stdout: "pipe" without reading output caused buffer deadlock
  3. Missing package.json in ~/.local/share/opencode/bin/ caused bun to walk up and use a parent package.json

Changes

  • Change bun installbun add for all 8 LSP installers
  • Change stdout/stderr/stdin: "pipe""ignore" to prevent deadlock
  • Create empty package.json in bin directory on startup to anchor bun installs

AHaldner avatar Jan 06 '26 14:01 AHaldner