emacs-lsp / lsp-python-ms

lsp-mode :heart: Microsoft's python language server
https://emacs-lsp.github.io/lsp-python-ms
BSD 3-Clause "New" or "Revised" License
190 stars 41 forks source link

How to use other flycheck checkers #43

Open forrestchang opened 5 years ago

forrestchang commented 5 years ago

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

braineo commented 5 years ago

You can take a look at my config at this line

or TL;DR

(setq-local flycheck-checker 'python-pylint)
jidicula commented 4 years ago

Have you seen pycheck-flycheckers?

dschaehi commented 3 years ago

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.")))))