From 470e650295edfbe1355b2af9592b2902565073db Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 19 Jan 2021 18:18:19 -0500 Subject: [PATCH] Switch to lsp-pyright for Python lsp-mode client --- emacs/.emacs.d/init.org | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index bd04131..598e326 100755 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -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