lsp-python-ms icon indicating copy to clipboard operation
lsp-python-ms copied to clipboard

How to use other flycheck checkers

Open forrestchang opened this issue 5 years ago • 3 comments

For example, I want use pylint after lsp-ui, and mypy after pylint, how should I setup?

forrestchang avatar Jul 02 '19 08:07 forrestchang

You can take a look at my config at this line

or TL;DR

(setq-local flycheck-checker 'python-pylint)

braineo avatar Jul 02 '19 15:07 braineo

Have you seen pycheck-flycheckers?

jidicula avatar Aug 25 '20 19:08 jidicula

The following hack has worked for me:

(use-package lsp-python-ms
  :init
  (setq lsp-python-ms-auto-install-server t)
  :hook
  ((python-mode . (lambda ()
                    (require 'lsp-python-ms)
                    (lsp-deferred)))
   ;; This hack is necessary to make additional flycheck checkers work in lsp-mode
   (flycheck-mode . (lambda ()
                      (flycheck-add-next-checker 'lsp 'python-flake8)
                      (flycheck-add-next-checker 'python-flake8 'python-mypy)
                      (message "Added flycheck checkers.")))))

dschaehi avatar Dec 04 '20 22:12 dschaehi