Bläddra i källkod

Cleaning stuff around.

Gotta remove packages.el from the repo now that the config.org handles
its generation.
Eiyeron Fulmincendii 5 år sedan
förälder
incheckning
2bdfbbee8c
2 ändrade filer med 55 tillägg och 34 borttagningar
  1. 54 24
      config.org
  2. 1 10
      packages.el

+ 54 - 24
config.org

@@ -18,6 +18,54 @@ around this list:
 - Org
 - Bash (eventually zsh)
 - and of course, emacs-lisp
+* TODO Packages
+:PROPERTIES:
+:header-args:elisp: :tangle packages.el
+:END:
+I heard I could manage my ~packages.el~ file directly from here. So why not
+doing it?
+** The file header
+First, the header so Doom shouldn't byte-compile this file. It'd make the
+updates harder due to requiring a manual ~doom build~ invocation for every
+change done. I'm directly stealing it from the example provided by Doom Emacs.
+
+#+begin_src elisp
+;; -*- no-byte-compile: t; -*-
+;;; .doom.d/packages.el
+#+end_src
+** TODO The packages
+*** Vterm
+It's rather solid for a terminal emulator. Too bad it doesn't seem to work on
+Windows. (Actually I haven't tried so hard, I just don't always have the time to
+find a way to compile it)
+#+begin_src elisp
+(package! vterm :ignore (eq system-type 'windows-nt))
+#+end_src
+*** Graphviz
+Making graphs is fun
+#+begin_src elisp
+(package! graphviz-dot-mode)
+#+end_src
+*** Python pacakges
+Python X allows me to have a notebook-ish workflow. More about this in its
+configuration section
+#+begin_src elisp
+(package! python-x)
+#+end_src
+* Helper functions
+I had issues before dealing with specific patterns at configuration time. At
+this moment, I don't have all the packages nor do I want to deal with them
+manually. So I'm reinventing the wheel at some places to make the configuration
+easier to use.
+** A filter function
+I haven't found one bundled with emacs yet. I'm using a homebrew filter function
+directly taken from a cookbook page [[https://www.emacswiki.org/emacs/ElispCookbook#toc39][here]] so I can skip requiring ~cl~ or ~seq~
+at launch.
+#+begin_src elisp
+(defun chicken/filter (condp lst)
+  (delq nil
+        (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
+#+end_src
 * Look and Feel
 ** The colors
 Lately, I have been partial towards Gruvbox, for multiple reasons, the first
@@ -41,18 +89,10 @@ On the other hand, I don't always want to install all the fonts everywhere, so
 let's build first a font selector so I can gracefully fallback on other fonts
 when needed.
 
-I'm using a homebrew filter function directly taken from a cookbook page [[https://www.emacswiki.org/emacs/ElispCookbook#toc39][here]] so
-I can skip requiring ~cl~ or ~seq~ at launch.
 #+begin_src emacs-lisp
-(defun chicken/filter (condp lst)
-  (delq nil
-        (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
-
 (defun chicken/select-first-available-font (fonts-to-select)
   (let ((available-fonts (font-family-list)))
     (car (chicken/filter (lambda (elt) (member elt available-fonts)) fonts-to-select))))
-
-(chicken/select-first-available-font '("PragmataPro Liga" "PragmataPro" "Consolas" "Courrier New"))
 #+end_src
 
 Now the font proper selection
@@ -63,25 +103,15 @@ Now the font proper selection
       (unicode-font (chicken/select-first-available-font '("PragmataPro Liga" "PragmataPro" "Segoe UI")))
       (serif-font (chicken/select-first-available-font '("Iosevka Slab" "Courrier New" "Courrier New"))))
   (setq doom-font
-        (font-spec
-         :family code-font
-         :size base-size)
+        (font-spec :family code-font :size base-size)
         doom-variable-pitch-font
-        (font-spec
-         :family variable-font
-         :size base-size)
+        (font-spec :family variable-font :size base-size)
         doom-unicode-font
-        (font-spec
-         :family unicode-font
-         :size base-size)
+        (font-spec :family unicode-font :size base-size)
         doom-big-font
-        (font-spec
-         :family code-font
-         :size (* base-size 2))
+        (font-spec :family code-font :size (* base-size 2))
         doom-serif-font
-        (font-spec
-         :family serif-font
-         :size base-size)))
+        (font-spec :family serif-font :size base-size)))
 #+END_SRC
 
 A note about the serif font: I can't set the styling set for a given font on
@@ -142,7 +172,7 @@ me.
 Python-x allows me to have the same cell-based workflow than on Jupter or
 Spyder. I'd like also to use similar separators to what I currently use (~# %%~).
 #+BEGIN_SRC emacs-lisp
-(after! python
+(after! python-x
   (python-x-setup)
   (setq python-section-delimiter "# %%"))
 #+END_SRC

+ 1 - 10
packages.el

@@ -1,17 +1,8 @@
 ;; -*- no-byte-compile: t; -*-
 ;;; .doom.d/packages.el
 
-;;; Examples:
-;; (package! some-package)
-;; (package! another-package :recipe (:host github :repo "username/repo"))
-;; (package! builtin-package :disable t)
+(package! vterm :ignore (eq system-type 'windows-nt))
 
-
-;; I don't know if vterm works on Windows
-(package! vterm)
-
-;; Graphviz, I love graphes!
 (package! graphviz-dot-mode)
 
-;; IPython-like cell handling
 (package! python-x)