anomalyco / anomalyco/opencode

[FEATURE]: Built-in flag-gated Ruff LSP server (parity with the existing ty LSP)

Open
#38,226 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Jul 22, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Follow-up to #5345, which was auto-closed for inactivity (the bot suggested opening a fresh one).

opencode already ships ty as a built-in Python LSP behind an experimental flag (experimentalLspTy in packages/opencode/src/lsp/server.ts), but there is no built-in ruff server counterpart — Ruff is wired up only as a formatter. Astral's own guidance is to run ty + ruff together (ty for types, ruff for lint + quick-fixes / import fixing), so the built-in Python LSP support is currently half-complete.

Proposal: add a flag-gated ruff LSP that mirrors the existing Ty server exactly and runs alongside pyright/ty rather than replacing them (same way eslint runs next to typescript):

  • new Ruff entry in lsp/server.ts, extensions .py/.pyi, launched via ruff server
  • gated by an experimental flag, symmetric with ty
  • detect ruff on PATH or in .venv/venv, no auto-install (per the earlier maintainer note in #5345)

I know this is achievable today via custom lsp config, and there were prior stale PRs (#9126, #14850). Filing this mainly to confirm whether a first-class, ty-symmetric built-in is wanted before I open a PR — happy to implement it if so.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.