lsp-mode client for the Pyrefly Python type checker.
This package is a fork of lsp-pyright.
Install Pyrefly:
pip install pyrefly
# or
uv pip install pyrefly(use-package lsp-pyrefly
:ensure t
:hook ((python-mode python-ts-mode) . lsp-deferred))(require 'lsp-pyrefly)
(add-hook 'python-mode-hook #'lsp-deferred)
(add-hook 'python-ts-mode-hook #'lsp-deferred)Pyrefly is configured via pyrefly.toml or [tool.pyrefly] in pyproject.toml. See the Pyrefly configuration docs.
All standard LSP features are supported via Pyrefly:
- Diagnostics (errors, warnings, hints)
- Go to definition / type definition / implementation
- Find references
- Hover information
- Completions
- Signature help
- Rename
- Document/workspace symbols
- Inlay hints
- Semantic highlighting
- Call hierarchy
GPL-3.0+