branch: elpa/flymake-pyrefly commit 0356d823f2d49322ba51917b7fc01c6e8ec294f1 Author: Boris Shminke <bo...@shminke.com> Commit: Boris Shminke <bo...@shminke.com>
update README --- README.org | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 8af3160162f..8b77e92bf48 100644 --- a/README.org +++ b/README.org @@ -1,11 +1,28 @@ * flymake-pyrefly -A [[https://pyrefly.org/][Pyrefly]] backend for [[https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html#Top][Flymake]]. +[[https://pyrefly.org/][Pyrefly]] is a fast Python type checker written in Rust. +flymake-pyrefly is a Pyrefly backend for [[https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html#Top][Flymake]] that helps you to +see typing errors in your Pyton files. * How to install +flymake-pyrefly is available on [[https://elpa.nongnu.org/][nonGNU Emacs Lisp Package Archive]], +so you can install it by ~M-x package-install RET flymake-pyrefly RET~. + +To add flymake-pyrefly to the list of Flymake backends when editing +Python files (notice the difference if you use eglot): + #+begin_src elisp + (add-hook 'python-base-mode-hook #'pyrefly-setup-flymake-backend) + + ;; alternatively, with use-package + (use-package flymake-pyrefly + :hook (python-base-mode . pyrefly-setup-flymake-backend)) + + ;; or if you use eglot + (add-hook 'eglot-managed-mode-hook #'pyrefly-setup-flymake-backen) + + ;; if you use eglot and use-package (use-package flymake-pyrefly - :vc (:url "https://github.com/inpefess/flymake-pyrefly.git") - :hook (python-mode . pyrefly-setup-flymake-backend)) + :hook (eglot-managed-mode . pyrefly-setup-flymake-backend)) #+end_src