diff options
| author | tslil clingman <tslil@posteo.de> | 2025-06-25 20:17:04 +0100 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2025-06-25 20:17:04 +0100 |
| commit | 205567cecfeb0a6a50d93767eb87c76a574b1833 (patch) | |
| tree | 44f891490897aba56ec2433eadecceabc62c53cd | |
| parent | 22115670e5e89e340e61ae149d7b95fa8396a6f2 (diff) | |
[emacs] use treesit-auto
| -rw-r--r-- | emacs/inits/20-programming.el | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index 881bfc6..b3b034b 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2025-06-25 20h00 BST (anker)> +;; Time-stamp: <2025-06-25 20h15 BST (anker)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -28,6 +28,13 @@ (add-to-list 'eglot-server-programs '(python-mode . ("pyright-langserver" "--stdio")))) +(use-package treesit-auto + :custom + (treesit-auto-install 'prompt) + :config + (treesit-auto-add-to-auto-mode-alist 'all) + (global-treesit-auto-mode)) + (use-package centered-window :defer :ensure) @@ -212,7 +219,9 @@ :bind (:map python-mode-map ("C-c C-f" . nil) - ("M-/" . hippie-expand))) + ("M-/" . hippie-expand)) + :config + (setq python-ts-mode-hook python-mode-hook)) ;; ----------------------------------------------------------------------------- ;; Rust @@ -242,7 +251,8 @@ (setq rust-indent-offset 4 rust-indent-method-chain t rust-indent-where-clause t - rust-format-on-save t)) + rust-format-on-save t) + (setq rust-ts-mode-hook rust-mode-hook)) ;; ------------------------------------------------------------------- @@ -280,7 +290,9 @@ ("M-n" . end-of-defun) ("C-c C-c" . zig-compile) ("C-c r" . zig-run) - ("C-c C-r" . my-zig-run))) + ("C-c C-r" . my-zig-run)) + :config + (setq zig-ts-mode-hook zig-mode-hook)) (use-package uiua-ts-mode :ensure |
