Manually configure eglot for flymake to allow multiple backends
Add config for jedi-language-server, disable built in diagnostics as I'm using flymake-ruff for linting
This commit is contained in:
parent
405cbcafe2
commit
8edb0dc02c
28
README.org
28
README.org
|
@ -769,18 +769,14 @@ Set treesit to fontify all elements, default was 3 (out of 4)
|
|||
("C-c c C-e" . eglot-reconnect)
|
||||
("C-c c a" . eglot-code-actions)
|
||||
("C-c c r" . eglot-rename))
|
||||
:hook ((nix-mode
|
||||
fortran-mode
|
||||
f90-mode
|
||||
shell-script-mode
|
||||
lua-mode
|
||||
python-base-mode
|
||||
rust-ts-mode) . eglot-ensure)
|
||||
:hook (((nix-mode fortran-mode f90-mode lua-mode python-base-mode rust-ts-mode) . eglot-ensure)
|
||||
(eglot-managed-mode . (lambda () (add-to-list 'flymake-diagnostic-functions #'eglot-flymake-backend))))
|
||||
:custom
|
||||
(eglot-extend-to-xref t)
|
||||
(eglot-autoshutdown t)
|
||||
(eglot-autoreconnect nil)
|
||||
:config
|
||||
(setq eglot-stay-out-of '(flymake))
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((nix-mode)
|
||||
. ("nil"
|
||||
|
@ -795,7 +791,14 @@ Set treesit to fontify all elements, default was 3 (out of 4)
|
|||
( :check (:command "clippy")
|
||||
:procMacro (:enable t)
|
||||
:cargo ( :buildScripts (:enable t)
|
||||
:features "all"))))))
|
||||
:features "all")))))
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((python-ts-mode python-mode)
|
||||
. ("jedi-language-server"
|
||||
:initializationOptions
|
||||
( :diagnostics ( :enable nil)
|
||||
:hover ( :enable t)
|
||||
:jediSettings ( :autoImportModules ["numpy"]))))))
|
||||
#+end_src
|
||||
|
||||
** Apheleia formatting
|
||||
|
@ -838,6 +841,15 @@ Set treesit to fontify all elements, default was 3 (out of 4)
|
|||
:hook (sh-mode . flymake-shellcheck-load))
|
||||
#+end_src
|
||||
|
||||
*** ruff
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flymake-ruff
|
||||
:ensure t
|
||||
:after (flymake eglot)
|
||||
:diminish
|
||||
:hook (python-base-mode . flymake-ruff-load))
|
||||
#+end_src
|
||||
|
||||
** Project
|
||||
#+begin_src emacs-lisp
|
||||
(setq project-switch-use-entire-map t
|
||||
|
|
Loading…
Reference in a new issue