Files
emacs/config/formatting.org
2025-10-30 13:42:01 -05:00

1.3 KiB

Blocks, Parentheses and Formatting Oh My!

Parentheses, and Structural Editing

Sometimes if I delete a parenthesis out of hand I spend the next minute or two kicking myself as I count the parentheses here and there. Well no more! With Parinfer structural editing, and taming parentheses becomes a breeze.

(use-package parinfer-rust-mode
  :ensure t
  :init
  (setq parinfer-rust-auto-download t)
  :hook (emacs-lisp-mode . parinfer-rust-mode))

I also have smart-parens for parentheses matching in modes where parinfer would be overkill.

(use-package smartparens
  :ensure t
  :hook (prog-mode text-mode markdown-mode)
  :config
  (require 'smartparens-config))

Might as well highlight the parentheses to make them easier to spot.

(use-package highlight-parentheses
  :ensure t
  :hook
  (prog-mode . highlight-parentheses-mode))

Indentation Level

;; Indent guides
(use-package highlight-indent-guides
  :defer t
  :hook (prog-mode . highlight-indent-guides-mode))

List, and String Improvements

(use-package dash :ensure t)
(use-package s :ensure t)