Disable some pylsp plugins that aren't needed, add ruff back

This commit is contained in:
Evie Litherland-Smith 2024-04-26 10:56:37 +01:00
parent 519f529c43
commit 21598193e4

34
init.el
View file

@ -928,14 +928,24 @@ Try `magit-clone-default-directory' if available, fall back to
(setq eglot-stay-out-of '(flymake))
(setq-default eglot-workspace-configuration
'( :pylsp ( :plugins
( :jedi_completion
( :enabled t
:include_params t
:include_class_objects t
:include_function_objects t
:fuzzy t)
( :autopep8 (:enabled nil)
:flake8 (:enabled nil)
:jedi_completion ( :enabled t
:include_params t
:include_class_objects t
:include_function_objects t
:fuzzy t)
:jedi_definition (:enabled t)
:jedi_hover (:enabled t)))
:jedi_hover (:enabled t)
:mccabe (:enabled nil)
:preload (:enabled nil)
:pycodestyle (:enabled nil)
:pyflakes (:enabled nil)
:pylint (:enabled nil)
:rope_autoimport ( :completions (:enabled t)
:code_actions (:enabled t))
:rope_completion (:enabled t)
:yapf (:enabled nil)))
:nil ( :nix
( :maxMemoryMB nil
:flake
@ -958,8 +968,8 @@ Try `magit-clone-default-directory' if available, fall back to
:config
(add-to-list 'apheleia-formatters '(alejandra . ("alejandra")))
(add-to-list 'apheleia-mode-alist '(nix-mode . alejandra))
(add-to-list 'apheleia-mode-alist '(python-mode . (black isort)))
(add-to-list 'apheleia-mode-alist '(python-ts-mode . (black isort))))
(add-to-list 'apheleia-mode-alist '(python-mode . (ruff isort)))
(add-to-list 'apheleia-mode-alist '(python-ts-mode . (ruff isort))))
(use-package flymake
:bind (("C-c C-." . flymake-goto-next-error)
@ -969,7 +979,7 @@ Try `magit-clone-default-directory' if available, fall back to
(use-package flymake-popon
:after flymake
:config
:init
(global-flymake-popon-mode +1))
(use-package flymake-collection
@ -996,6 +1006,10 @@ Try `magit-clone-default-directory' if available, fall back to
:after flymake
:hook (js-ts-mode . flymake-eslint-enable))
(use-package flymake-ruff
:after flymake
:hook (python-base-mode . flymake-ruff-load))
(setq project-switch-use-entire-map t
project-switch-commands '((project-find-file "Find file")
(project-find-regexp "Find regexp")