Add lazy loading of lsp-python-ms

This commit is contained in:
yqu212 2019-08-04 20:24:28 +08:00 committed by smile13241324
parent 5900e85abd
commit 9f72af3b73
3 changed files with 6 additions and 1 deletions

View File

@ -2315,6 +2315,7 @@ Other:
- Added support for 'black' formatter (thanks to Mike Macpherson)
- Enabled =eldoc= for =anaconda-mode= (thanks to Vikash Balasubramanian)
- Various fixes for =lsp-python-ms= setup (thanks to Trapez Breen)
- Added lazy loading of =lsp-python-ms= (thanks to Ying Qu)
**** Racket
- Restore smart closing paren behavior in racket-mode (thanks to Don March)
- Updated racket logo (thanks to Vityou)

View File

@ -61,7 +61,10 @@
(defun spacemacs//python-setup-lsp ()
"Setup lsp backend."
(if (configuration-layer/layer-used-p 'lsp)
(lsp)
(progn
(lsp)
(when (eq python-lsp-server 'mspyls)
(require 'lsp-python-ms)))
(message "`lsp' layer is not installed, please add `lsp' layer to your dotfile."))
(if (configuration-layer/layer-used-p 'dap)
(progn

View File

@ -427,6 +427,7 @@ fix this issue."
(use-package lsp-python-ms
:if (eq python-lsp-server 'mspyls)
:ensure nil
:defer t
:config
(when python-lsp-git-root
;; Use dev version of language server checked out from github