diff options
| author | tslil <tslil@posteo.de> | 2026-07-31 11:44:50 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-07-31 12:02:29 +0100 |
| commit | ea4bda4fa6117f9f6e59d2cbe14aad45ef72ed5f (patch) | |
| tree | 796dc6946f792595a4e9e0cf2fc2354160811927 | |
| parent | a04e7196ab19eba41a9fcca8afaace8b4081cdde (diff) | |
[emacs] use reformatter for oxfmt, teach ibuffer about rust
| -rw-r--r-- | emacs/inits/13-ibuffer.el | 7 | ||||
| -rw-r--r-- | emacs/inits/20-programming.el | 34 |
2 files changed, 28 insertions, 13 deletions
diff --git a/emacs/inits/13-ibuffer.el b/emacs/inits/13-ibuffer.el index 6db2a3c..b7139f8 100644 --- a/emacs/inits/13-ibuffer.el +++ b/emacs/inits/13-ibuffer.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2022-08-19 11h19 CEST (anchor)> +;; Time-stamp: <2026-07-31 11h44 BST (51019882)> (use-package ibuffer :bind (("C-x C-b" . ibuffer)) @@ -23,7 +23,10 @@ (mode . helpful-mode) (name . "^\\*Help\\*$"))) ("magit" (name . "^magit[:-]")) - ("python" (mode . python-mode)) + ("python" (or (mode . python-mode) + (mode . python-ts-mode))) + ("rust") (or (mode . rust-mode) + (mode . rust-ts-mode)) ("REPL" (name . "^\\*.*REPL.*\\*$")) ("shell" (mode . sh-mode))))) diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index 157faa2..e8ae9b5 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2026-07-30 13h35 BST (e5af9745)> +;; Time-stamp: <2026-07-31 11h59 BST (51019882)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -293,20 +293,32 @@ :bind (:map json-mode-map ("C-c C-f" . nil))) + +(use-package reformatter + :ensure t + :config + (reformatter-define oxfmt + :program "pnpm" + :args (list "exec" + "oxfmt" + "--stdin-filepath" + (or buffer-file-name (buffer-name))))) + +(defun my-jtsx-setup () + (eglot-ensure) + (programming-setup) + (oxfmt-on-save-mode 1)) + (use-package jtsx :ensure t - :defer + :defer t :mode (("\\.jsx?\\'" . jtsx-jsx-mode) - ("\\.tsx\\'" . jtsx-tsx-mode) - ("\\.ts\\'" . jtsx-typescript-mode)) + ("\\.tsx\\'" . jtsx-tsx-mode) + ("\\.ts\\'" . jtsx-typescript-mode)) :commands jtsx-install-treesit-language - :hook ( - (jtsx-tsx-mode . (lambda () - (eglot-ensure) - (programming-setup))) - (jtsx-typescript-mode . (lambda () - (eglot-ensure) - (programming-setup))))) + :hook ((jtsx-jsx-mode . my-jtsx-setup) + (jtsx-tsx-mode . my-jtsx-setup) + (jtsx-typescript-mode . my-jtsx-setup))) (use-package lua-mode :ensure |
