Document (and optionally ship) Pyrefly as a Claude Code LSP for semantic navigation
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Description
Is there interest in documenting Pyrefly as an LSP for Claude Code?
To be clear, this is not about the final type correctness checking, which I 100% agree should be via the CLI (e.g., via a pre-commit configuration), but about allowing the agent to find definitions and usages, and to retrieve type information. The typical fallback of Claude Code, `grep`, is slower, less precise, and consumes more context tokens.
I didn't look into the details too much, but there is the `pyright-lsp` plugin [already](https://code.claude.com/docs/en/plugins-reference). In principle, it should be possible to define a custom plugin that uses pyrefly's LSP here via an entry in [`.lsp.json`](https://code.claude.com/docs/en/plugins-reference#file-locations-reference).
I think this would be a nice addition to the [IDE docs](https://pyrefly.org/en/docs/IDE/) and would allow users to stay in the pyrefly ecosystem.
Optionally, you could submit a plugin to the Claude marketplace that sets exactly these values and just takes pyrefly from `PATH`.
Contributor guide
Assessment
This issue has not been assessed yet.