From 91da886a69604c7fb94bbd2e0b2eff40ac4fdddd Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Fri, 8 Dec 2023 11:36:06 +0000 Subject: [PATCH] Add Nix config --- config.org | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/config.org b/config.org index 8094597..8f471a7 100644 --- a/config.org +++ b/config.org @@ -1229,6 +1229,18 @@ (add-to-list 'auto-mode-alist '("\\.bbc\\'" . basic-mode)) #+end_src +** Nix + Basic editing support comes from =nix-mode=: + + #+begin_src emacs-lisp + (use-package nix-mode) + #+end_src + + And =nix-update= provides a convenient way to update ~fetch~ + blocks: + + #+begin_src emacs-lisp + (use-package nix-update) #+end_src * Tool Integrations @@ -1527,6 +1539,14 @@ (global-set-key (kbd "C-.") #'god-mode-all) #+end_src + I find it jarring and confusing to have it on and off in different + types of buffers, so will just disable the exemptions: + + #+begin_src emacs-lisp + (setq god-exempt-major-modes nil) + (setq god-exempt-predicates nil) + #+end_src + ** Case-flipping Want to be able to toggle the 'shiftedness' of a selected region, that is, map uppercase to lowercase and vice versa, but also map @@ -1618,3 +1638,13 @@ #+begin_src emacs-lisp (global-set-key (kbd "C-~") 'flip-region-case) #+end_src + +* Fin + Now that start-up is finished, [[help:gc-cons-threshold][gc-cons-threshold]] and + [[help:gc-cons-percentage][gc-cons-percentage]] need to be set back to reasonable values to avoid + memory usage getting too high. + + #+begin_src emacs-lisp + (setq gc-cons-threshold 1000000) + (setq gc-cons-percentage 0.2) + #+end_src