summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-programming.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-06-25 14:15:58 +0100
committerjao <jao@gnu.org>2026-06-25 14:15:58 +0100
commite7a033d37898567915d41266daa903b3c48a11f5 (patch)
tree06fb2ab7b744275aa9c78a371062d5b35e0b8a35 /custom/jao-custom-programming.el
parent2cc462d0c581c4cd677b48d721b40290c40dbbbe (diff)
downloadelibs-e7a033d37898567915d41266daa903b3c48a11f5.tar.gz
elibs-e7a033d37898567915d41266daa903b3c48a11f5.tar.bz2
python and rust tweaks
Diffstat (limited to 'custom/jao-custom-programming.el')
-rw-r--r--custom/jao-custom-programming.el29
1 files changed, 22 insertions, 7 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el
index f591ce1..c58b3a9 100644
--- a/custom/jao-custom-programming.el
+++ b/custom/jao-custom-programming.el
@@ -64,13 +64,7 @@
eglot-autoshutdown t)
:config
(add-to-list 'eglot-server-programs
- `(rust-mode . ("rust-analyzer"
- :initializationOptions
- (:check (:command "check") ;; (:command "clippy")
- :procMacro
- (:enable t :ignored
- (:async-trait ["async-trait"]))
- ))))
+ '((python-base-mode :language-id "python") . ("ty" "server")))
;; :config (add-to-list 'eglot-stay-out-of 'flymake)
:hook (eglot-managed-mode . jao-eglot-managed-mode-hook)
:bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle))))
@@ -309,6 +303,16 @@
(use-package rust-mode
:ensure t
:hook (rust-mode . jao-rust-mode-hook)
+ :init
+ (with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ `(rust-mode . ("rust-analyzer"
+ :initializationOptions
+ (:check (:command "clippy") ;; (:command "check")
+ :procMacro
+ (:enable t :ignored
+ (:async-trait ["async-trait"]))
+ :diagnostics (:disable ["unlinked-file"]))))))
:config
(setq rust-mode-treesitter-derive t)
(use-package smartparens-rust :demand t)
@@ -337,6 +341,7 @@
(rustic-cargo-test-runner 'nextest)
(rustic-cargo-nextest-exec-command '("nextest" "run" "--color=never" "--show-progress=none"))
:bind (:map rustic-mode-map (("C-c d" . jao-rust-build-doc)
+ ("C-c t d" . jao-rust-test-doctests)
("C-c t g" . jao-rust-goto-tests)
("C-c t w" . jao-rust-test-workspace)
("C-c t m" . jao-rust-test-module)
@@ -613,6 +618,16 @@
;; (venv-initialize-eshell)
;; (jao-compilation-env "VIRTUAL_ENV"))
+(use-package uv-mode
+ :ensure t
+ :hook (python-mode . uv-mode-auto-activate-hook))
+
+(use-package python
+ :init
+ (setq-default eglot-workspace-configuration
+ '((:python . (:analysis (:typeCheckingMode "off")))))
+ :hook (python-base-mode . eglot-ensure))
+
;;;; Javascript
(use-package typescript-mode