feat(LSP): Add PyLSP configurations for eglot

Replicate the same base configuration used for python-lsp-server in
Neovim but for Emacs's Eglot LSP client.
This commit is contained in:
Dionisio E Alonso 2024-02-04 18:33:28 -03:00
parent af5a35e874
commit 54938dd02c
1 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,14 @@
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
(add-hook 'prog-mode-hook 'eglot-ensure) ; Requires LSP servers in PATH
(setq-default eglot-workspace-configuration
'(:pylsp (:configurationSources ["flake8"]
:plugins (:ruff (:enabled t)
:flake8 (:enabled t)
:pylint (:enabled t)
:pylsp_mypy (:enabled t)
:pycodestyle (:enabled nil)
:pyflakes (:enabled nil)))))
(when window-system (set-frame-size (selected-frame) 85 60))
; After dealing with some nice defaults setup packages