Switch to lsp-pyright for Python lsp-mode client
This commit is contained in:
parent
4963030b81
commit
470e650295
@ -3046,18 +3046,15 @@ And support pyenv (NOT pyvenv) to change Python versions:
|
||||
|
||||
Use the LSP python client:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package lsp-python-ms
|
||||
:init
|
||||
(setq lsp-python-ms-auto-install-server t)
|
||||
(defun python-lsp ()
|
||||
(require 'lsp-python-ms)
|
||||
(lsp-deferred))
|
||||
:hook
|
||||
(python-mode . python-lsp)
|
||||
(use-package lsp-pyright
|
||||
:hook (python-mode . (lambda ()
|
||||
(require 'lsp-pyright)
|
||||
(lsp-deferred)))
|
||||
:custom
|
||||
(lsp-pyright-use-library-code-for-types t)
|
||||
:general
|
||||
(python-mode-map "C-c C-d" #'lsp-describe-thing-at-point))
|
||||
|
||||
(general-def 'normal python-mode-map "C-c C-d" #'lsp-describe-thing-at-point)
|
||||
(python-mode-map "C-c C-d" #'lsp-describe-thing-at-point)
|
||||
('normal python-mode-map "K" #'lsp-describe-thing-at-point))
|
||||
#+END_SRC
|
||||
|
||||
Override the flycheck python-mypy checker to run in the right
|
||||
|
Loading…
Reference in New Issue
Block a user