diff options
Diffstat (limited to 'emacs/inits/20-programming.el')
| -rw-r--r-- | emacs/inits/20-programming.el | 57 |
1 files changed, 16 insertions, 41 deletions
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index 9f37c71..6664597 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2023-12-05 12h55 CET (23c7555b)> +;; Time-stamp: <2024-01-07 12h56 CET (anker)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -23,24 +23,9 @@ (use-package centered-window :ensure t) -;; (use-package origami -;; :ensure t -;; :bind (("C-c C-f C-f" . origami-recursively-toggle-node) -;; ("C-c C-f C-o" . origami-show-only-node) -;; ("C-c C-f C-u" . origami-undo) -;; ("C-c C-f C-r" . origami-redo)) -;; :config -;; (global-origami-mode -1)) - (use-package hideshow :bind (("C-c C-f C-f" . hs-toggle-hiding))) -(use-package treesit-auto - :ensure t - :config - (global-treesit-auto-mode) - (setq treesit-auto-install t)) - (use-package dtrt-indent :ensure t :config @@ -101,11 +86,6 @@ ;; ----------------------------------------------------------------------------- ;; C -;; What are these? -;; (setq gdb-show-threads-by-default nil -;; gdb-many-windows nil -;; gdb-show-main nil) - (use-package clang-format :ensure t :defer @@ -214,12 +194,6 @@ ;; ----------------------------------------------------------------------------- ;; Python -;; (use-package yapfify -;; :ensure t -;; :defer t -;; :config -;; (setq yapfify-executable "yapf3")) - (use-package python-black :ensure t :after python @@ -232,21 +206,15 @@ :ensure t :defer t :config - (setq highlight-indent-guides-auto-odd-face-perc 1.5 ;; 10 - highlight-indent-guides-auto-even-face-perc 3 ;; 15 - )) + (setq highlight-indent-guides-auto-odd-face-perc 10 + highlight-indent-guides-auto-even-face-perc 15)) (use-package python :hook (python-mode . (lambda () - (highlight-indent-guides-mode) - (visual-line-mode) - ;; (yapf-mode) - )) + (highlight-indent-guides-mode t) + (visual-line-mode))) :bind (:map python-mode-map - ("C-c C-f" . nil)) - ;; :config - ;; (setq python-shell-interpreter "python3") - ) + ("C-c C-f" . nil))) ;; ----------------------------------------------------------------------------- ;; Rust @@ -272,9 +240,6 @@ ("C-c r r" . rust-run)) :hook (rust-mode . (lambda () (cargo-minor-mode) - ;; For some reason this is not automatic - (setq-local electric-pair-pairs - (cons '(?' . ?') electric-pair-pairs)) ;; Pair {} in rust format strings ... ? (setq-local electric-pair-text-pairs (cons '(?{ . ?}) electric-pair-pairs)) @@ -376,3 +341,13 @@ :defer t :config (setq uxntal-mode-strict-comments t)) + +;; ------------------------------------------------------------------- +;; This goes last so that we can recover major mode hooks correctly + +(use-package treesit-auto + :ensure t + :config + (global-treesit-auto-mode) + (setq treesit-auto-install t) + (setq rust-ts-mode-hook rust-mode-hook)) |
