mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-07 00:07:29 +00:00
feat(python): add Pyrefly language server (#911)
Pyrefly (`pyrefly lsp`) joins basedpyright, Pyright and ty as a fallback Python language server. It is installable from Tools as a managed virtualenv tool and is listed among the interchangeable type checkers, before Ruff, so Ruff still runs after them. Pyrefly only reports type errors in projects with a Pyrefly configuration (`pyrefly.toml` or `[tool.pyrefly]`); hover, completion and navigation work without one. A real-server test (ignored by default, needs `pyrefly` on PATH) covers startup, go-to-definition and diagnostics. Co-authored-by: pcastro93 <2058578+pcastro93@users.noreply.github.com>
This commit is contained in:
@@ -40,6 +40,14 @@ args = ["server"]
|
||||
root-markers = ["ty.toml", "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile"]
|
||||
install-hint = "uv tool install ty (or: pip install ty)"
|
||||
|
||||
[[language-servers]]
|
||||
name = "pyrefly"
|
||||
fallback = true
|
||||
command = "pyrefly"
|
||||
args = ["lsp"]
|
||||
root-markers = ["pyrefly.toml", "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile"]
|
||||
install-hint = "uv tool install pyrefly (or: pip install pyrefly)"
|
||||
|
||||
# Lint, format, organize imports and fix all next to the type checker, in
|
||||
# projects configured for Ruff (formatting is Ruff's alone: basedpyright has none).
|
||||
[[language-servers]]
|
||||
|
||||
Reference in New Issue
Block a user