Merge branch 'pylsp-settings'

This commit is contained in:
Dionisio E Alonso 2024-02-04 18:36:39 -03:00
commit aeaf9bc692
3 changed files with 12 additions and 2 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

4
flake8
View File

@ -1,4 +1,6 @@
# Not in official documentation, but it can be placed in $XDG_CONFIG_HOME
# This does not work from $XDG_CONFIG_HOME, but python-lsp-server looks for it
# in that location anyways. This is explicitly achieved here:
# https://github.com/python-lsp/python-lsp-server/blob/fc2851a/pylsp/config/flake8_conf.py#L52
[flake8]
max-line-length = 79
#extend-ignore = E501, W293, W391, E402, W503 # Those are also checked by pylint

View File

@ -1,7 +1,7 @@
[mypy]
show_column_numbers = true
ignore_missing_imports = true
follow_imports = "silent"
follow_imports = silent
show_error_codes = true
warn_unused_configs = true