From 931a183347f39882981c84c41c0f40b9ba6e33ca Mon Sep 17 00:00:00 2001 From: John Turner Date: Wed, 3 Dec 2025 19:26:21 +0000 Subject: [PATCH] commit dir-locals --- .dir-locals.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..cccbb8c --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,26 @@ +((rust-mode . ((fmt-executable . "rustfmt") + (fmt-args . ("--edition=2024")) + (rust-cargo-default-arguments . "-r") + (eglot-workspace-configuration . (:rust-analyzer + (:check + (:overrideCommand ["ninja" "clippy-json" "-C" "build"])))) + (eval . (add-to-list 'eglot-server-programs + '((rust-ts-mode rust-mode) . + ("rust-analyzer" :initializationOptions + (:check + (:overrideCommand ["ninja" "clippy-json" "-C" "build"])))))) + (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 '("-"))))))