From 91f86ec4c8ba38a3b34903641fcbdebc86a68122 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Mon, 15 Apr 2019 16:46:50 -0400 Subject: [PATCH] added validate library --- conf.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conf.org b/conf.org index 6d1b6e3..c769bbb 100644 --- a/conf.org +++ b/conf.org @@ -6,6 +6,7 @@ This is my personal emacs config. It is quite massive. Please use the table of c - [[#for-new-users][for new users]] - [[#config-structure][config structure]] - [[#library][library]] + - [[#validation][validation]] - [[#external][external]] - [[#macros][macros]] - [[#functions][functions]] @@ -78,6 +79,12 @@ Once loaded, the =init.el= pulls in another file called =conf.el= with the funct Using an org file like this offers several advantages. First, org files are foldable in emacs which makes navigation easy. Second, they allow code snippets (the bit that actually go into =conf.el=) which allows for explanatory prose to be written around them, making documentation easy and clear. Third, =org-mode= has an automatic table of contents through the =toc-org= package, which makes naviagation even easier. Fourth, github itself is awesome enough to recognize org files as valid markdown and will render all the text, code snippets, headers, and table of contents in the nice html that you are reading now if on github. The result is a nearly self-documenting, self-organizing configuration that is easy to maintain and also easy to view for other users. Using the =init.el= itself would just have plain eLisp, which gets cluttered quickly. Some people break the =init.el= down into multiple files to keep everything sane, but I personally think it is easier to use one giant file that itself can be folded and abstracted to reduce the clutter. * library This is code that is used generally throughout the emacs config +** validation +This provides =setq-validate= which acts like a type checker for customizable variables. It must be loaded first since any other package may use it. +#+BEGIN_SRC emacs-lisp +(use-package validate + :straight t) +#+END_SRC ** external *** s #+BEGIN_SRC emacs-lisp