lang/python: lazy load lsp-python-ms
And comment on the hack.
This commit is contained in:
parent
063703bbd6
commit
94d5b73b45
1 changed files with 11 additions and 7 deletions
|
@ -248,12 +248,16 @@ called.")
|
|||
'(conda-env-current-name (" conda:" conda-env-current-name " "))
|
||||
'append))
|
||||
|
||||
;; lsp-python-ms setup
|
||||
(defun +python--dont-auto-install-server-a (orig-fn)
|
||||
lsp-python-ms-executable)
|
||||
|
||||
(use-package! lsp-python-ms
|
||||
:when (featurep! +lsp)
|
||||
:after lsp-clients
|
||||
:init
|
||||
(advice-add #'lsp-python-ms--command-string
|
||||
:override #'+python--dont-auto-install-server-a))
|
||||
|
||||
;; HACK lsp-python-ms shouldn't install itself if it isn't present. This
|
||||
;; circumvents LSP falling back to pyls when lsp-python-ms is absent.
|
||||
;; Installing the server should be a deliberate act; either 'M-x
|
||||
;; lsp-python-ms-setup' or setting `lsp-python-ms-executable' to an existing
|
||||
;; install will do.
|
||||
(defadvice! +python--dont-auto-install-server-a (orig-fn)
|
||||
:override #'lsp-python-ms--command-string
|
||||
lsp-python-ms-executable))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue