opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add texlab language server and latexindent formatter

Open edlsh opened this issue 2 weeks ago • 2 comments

Summary

Add LaTeX LSP support via TexLab language server.

Changes

  • Add TexLab LSP server with auto-download from GitHub releases
  • Add latexindent formatter for .tex files

Features

  • Code completion for commands, environments, citations, references
  • Hover documentation
  • Go-to-definition for labels and citations
  • Diagnostics via chktex (when installed)
  • BibTeX support (.bib files)

Files Modified

  • packages/opencode/src/lsp/server.ts - Added TexLab LSP server
  • packages/opencode/src/format/formatter.ts - Added latexindent formatter

Tests Run

  • bun run typecheck - Passed (opencode package)
  • bun test - 255 passed, 1 skipped, 0 failed
  • bun dev --help - Verified code compiles and runs
  • Verified asset naming against actual texlab GitHub releases (confirmed correct):
    • texlab-aarch64-macos.tar.gz
    • texlab-x86_64-macos.tar.gz
    • texlab-x86_64-linux.tar.gz
    • texlab-x86_64-windows.zip

edlsh avatar Dec 08 '25 18:12 edlsh

/review

rekram1-node avatar Dec 11 '25 04:12 rekram1-node

lgtm

github-actions[bot] avatar Dec 11 '25 04:12 github-actions[bot]