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