Browse Source

Replace mspyls with pyright

master
Taylor Bockman 1 year ago
parent
commit
8862b0dba8
  1. 11
      README.md
  2. 2
      elisp/custom.el
  3. 13
      elisp/modes/python-mode-settings.el

11
README.md

@ -64,6 +64,17 @@ you may use `M-<arrow>` where `<arrow>` 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 `<f2>`. To evalute

2
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.

13
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)

Loading…
Cancel
Save