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 /emacs/inits/20-programming.el | |
| parent | a04e7196ab19eba41a9fcca8afaace8b4081cdde (diff) | |
[emacs] use reformatter for oxfmt, teach ibuffer about rust
Diffstat (limited to 'emacs/inits/20-programming.el')
| -rw-r--r-- | emacs/inits/20-programming.el | 34 |
1 files changed, 23 insertions, 11 deletions
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 |
