From 84a497cc93ef8760c274afe5a801ded03a26a053 Mon Sep 17 00:00:00 2001 From: Ashley Duckworth Date: Fri, 22 Jan 2021 13:08:30 -0600 Subject: Add smartparens --- config.org | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/config.org b/config.org index 8945ab1..409767e 100644 --- a/config.org +++ b/config.org @@ -944,6 +944,49 @@ to auto-fill in programming modes, but /only/ the comments. show-paren-style 'mixed) #+end_src +*** Smart parens :package: + +#+begin_src emacs-lisp :noweb-ref packages + (straight-use-package 'smartparens) + (require 'smartparens-config) +#+end_src + +**** Show parens + +#+begin_src emacs-lisp :noweb-ref settings + (setq-default sp-show-pair-delay 0 + sp-show-pair-from-inside t) +#+end_src + +#+begin_src emacs-lisp :noweb-ref hooks + (add-hook 'prog-mode-hook #'show-smartparens-mode) +#+end_src + +**** Hide the =smartparens= lighter + +#+begin_src emacs-lisp :noweb-ref modes + (blackout 'smartparens-mode) +#+end_src + +**** Be strict in =prog-mode= + +#+begin_src emacs-lisp :noweb-ref hooks + (add-hook 'prog-mode-hook #'smartparens-strict-mode) +#+end_src + +** Formatting + +*** Aggressive indent :package: + +#+begin_src emacs-lisp :noweb-ref packages + (straight-use-package 'aggressive-indent) +#+end_src + +#+begin_src emacs-lisp :noweb-ref modes + (global-aggressive-indent-mode +1) + (blackout 'aggressive-indent-mode) +#+end_src + ** Executable scripts This poorly-named function will make a file executable if it looks -- cgit 1.4.1-21-gabe81