Files
gentoo-utils-gitea/.dir-locals.el
John Turner 8b700b0404
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 11s
Gentoo Utils / build (push) Successful in 35s
create rust-analyzer.sh script
This script should be ran by the LSP server to get error diagnostics.
2025-12-12 03:40:45 +00:00

27 lines
1.6 KiB
EmacsLisp

((rust-mode . ((fmt-executable . "rustfmt")
(fmt-args . ("--edition=2024"))
(rust-cargo-default-arguments . "-r")
(eglot-workspace-configuration . (:rust-analyzer
(:check
(:overrideCommand ["./rust-analyzer.sh"]))))
(eval . (add-to-list 'eglot-server-programs
'((rust-ts-mode rust-mode) .
("rust-analyzer" :initializationOptions
(:check
(:overrideCommand ["./rust-analyzer.sh"]))))))
(eval . (eglot-ensure))
(eval . (company-mode 1))
(eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t))
(eval . (add-hook 'eglot-managed-mode-hook (lambda ()
(eglot-inlay-hints-mode -1))
nil t))))
(meson-mode . ((fmt-executable . "meson")
(fmt-args . ("format" "-"))
(eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t))))
(python-ts-mode . ((eval . (flycheck-mode 1))
(eval . (flycheck-select-checker 'python-mypy))
(eval . (flycheck-add-next-checker 'python-mypy (cons t 'python-flake8)))
(eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t))
(eval . (setq-local fmt-executable "black"
fmt-args '("-"))))))