diff --git a/README.md b/README.md index b9f58e3..f14e7a2 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,17 @@ you may use `M-` where `` is your left, right, up, or down arrow k ## Languages +### Python + +Python support is implemented. You will want to install `node` (for npm) and then: + +``` +npm install -g pyright +``` + +`pyright` is used here because mspyls will be deprecated. `lsp-pyright` gives us very good coverage. If you use `.python-version` to denote +your `pyenv` version you can `M-x pyenv-activate-current-project`. + ### Lisp `SLIME` is installed and automatically configured to `sbcl`. To evalute the current `defun` in `SLIME` press ``. To evalute diff --git a/elisp/custom.el b/elisp/custom.el index 61f854e..b32a61d 100644 --- a/elisp/custom.el +++ b/elisp/custom.el @@ -4,7 +4,7 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(doom-modeline flycheck-indicator nord-theme powerline rainbow-delimiters python-pytest json-mode company-jedi jedi hl-defined counsel rainbow-identifiers exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package))) + '(lsp-pyright magit doom-modeline flycheck-indicator nord-theme powerline rainbow-delimiters python-pytest json-mode company-jedi jedi hl-defined counsel rainbow-identifiers exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/elisp/modes/python-mode-settings.el b/elisp/modes/python-mode-settings.el index fe617a5..67a2c41 100644 --- a/elisp/modes/python-mode-settings.el +++ b/elisp/modes/python-mode-settings.el @@ -67,12 +67,13 @@ ;; Use microsoft's python language server (add-hook 'python-mode-hook (lambda () (lsp-python-enable))) -(use-package lsp-python-ms - :ensure t - :init (setq lsp-python-ms-auto-install-server t) - :hook (python-mode . (lambda () - (require 'lsp-python-ms) - (lsp)))) ; or lsp-deferred + +(use-package lsp-pyright + :ensure t + :hook (python-mode . (lambda () + (require 'lsp-pyright) + (lsp-deferred)))) ; or lsp-deferred + ;; Python testing helpers (use-package python-pytest :ensure t)