diff --git a/emacs/init.el b/emacs/init.el index 1e8b977..e21eb14 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -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 diff --git a/flake8 b/flake8 index de9c84f..24bd7e8 100644 --- a/flake8 +++ b/flake8 @@ -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 diff --git a/mypy/config b/mypy/config index fa64f32..da83f18 100644 --- a/mypy/config +++ b/mypy/config @@ -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