X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/d98421d58e0407f3a08259259f0dd9ab09163874..0fbb9f4e96583667f5905f4314a75ab99559fb80:/init.org diff --git a/init.org b/init.org index 194a4b5..206b6be 100644 --- a/init.org +++ b/init.org @@ -444,6 +444,15 @@ compilation." `(after! (:all ,@features) ,@body))))) #+end_src +Convenience macro for =setq='ing multiple variables to the same value: + +#+begin_src emacs-lisp +(defmacro setq-every! (value &rest vars) + "Set all the variables from VARS to value VALUE." + (declare (indent defun) (debug t)) + `(progn ,@(mapcar (lambda (x) (list 'setq x value)) vars))) +#+end_src + * Core :PROPERTIES: :CUSTOM_ID: core @@ -1168,22 +1177,37 @@ instead. ("C-c l l" . hs-lint))) #+end_src -** SGML and HTML +** Web dev + +*** SGML and HTML #+begin_src emacs-lisp (use-package sgml-mode :config - (setq sgml-basic-offset 4)) + (setq sgml-basic-offset 2)) +#+end_src + +*** CSS and SCSS + +#+begin_src emacs-lisp +(use-package css-mode + :config + (setq css-indent-offset 2)) #+end_src -** Web mode +*** Web mode #+begin_src emacs-lisp (use-package web-mode - :mode "\\.html\\'") + :mode "\\.html\\'" + :config + (setq-every! 2 + web-mode-code-indent-offset + web-mode-css-indent-offset + web-mode-markup-indent-offset)) #+end_src -** Emmet mode +*** Emmet mode #+begin_src emacs-lisp (use-package emmet-mode @@ -1347,6 +1371,22 @@ Make =*scratch*= and =*Messages*= unkillable. Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]]. +** [[https://github.com/DarthFennec/highlight-indent-guides][highlight-indent-guides]] + +#+begin_src emacs-lisp +(use-package highlight-indent-guides + :demand t + :hook ((prog-mode . highlight-indent-guides-mode) + (org-mode . highlight-indent-guides-mode)) + :config + (setq highlight-indent-guides-character ?\|) + (setq highlight-indent-guides-auto-enabled nil) + (setq highlight-indent-guides-method 'character) + (setq highlight-indent-guides-responsive 'top) + (set-face-foreground 'highlight-indent-guides-character-face "gainsboro") + (set-face-foreground 'highlight-indent-guides-top-character-face "grey40")) ; grey13 is nice too +#+end_src + * Email ** [[https://notmuchmail.org][notmuch]]