[eglot] Add support for eglot lsp client in emacs
- Update README - Add eglot-specifics to cc, rs, py, hs removing unused lsp-mode packages when eglot is active - Add eglot-specific bindings - Add doctor warnings for debugger +lsp and +peek - Add eglot-backed lookup-handlers - Add flycheck checker using eglot for :checkers syntax users (using flycheck/flycheck#1676 and flycheck/flycheck#1592 discussion). This implementation is based on @marsam code, and uses recent Flycheck development in order to make the code smaller and easier to maintain.
This commit is contained in:
parent
f2a3dee7ff
commit
3e5b7cce3f
18 changed files with 248 additions and 47 deletions
|
@ -22,7 +22,10 @@ called.")
|
|||
python-indent-guess-indent-offset-verbose nil)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'python-mode-local-vars-hook #'lsp!))
|
||||
(add-hook 'python-mode-local-vars-hook #'lsp!)
|
||||
;; Use "mspyls" in eglot if in PATH
|
||||
(when (executable-find "Microsoft.Python.LanguageServer")
|
||||
(set-eglot-client! 'python-mode '("Microsoft.Python.LanguageServer"))))
|
||||
:config
|
||||
(set-repl-handler! 'python-mode #'+python/open-repl :persist t)
|
||||
(set-docsets! 'python-mode "Python 3" "NumPy" "SciPy")
|
||||
|
@ -98,6 +101,7 @@ called.")
|
|||
"Enable `anaconda-mode' if `lsp-mode' is absent and
|
||||
`python-shell-interpreter' is present."
|
||||
(unless (or (bound-and-true-p lsp-mode)
|
||||
(bound-and-true-p eglot--managed-mode)
|
||||
(bound-and-true-p lsp--buffer-deferred)
|
||||
(not (executable-find python-shell-interpreter)))
|
||||
(anaconda-mode +1))))
|
||||
|
@ -286,7 +290,7 @@ called.")
|
|||
|
||||
|
||||
(use-package! lsp-python-ms
|
||||
:when (featurep! +lsp)
|
||||
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
|
||||
:after lsp-clients
|
||||
:preface
|
||||
(after! python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue