Started work on making the configuration modular.
This commit is contained in:
63
README.org
63
README.org
@@ -7,19 +7,23 @@
|
|||||||
#+LATEX_HEADER: \lstset{breaklines=true, breakatwhitespace=true, basicstyle=\ttfamily\footnotesize, columns=fullflexible}
|
#+LATEX_HEADER: \lstset{breaklines=true, breakatwhitespace=true, basicstyle=\ttfamily\footnotesize, columns=fullflexible}
|
||||||
|
|
||||||
#+begin_src emacs-lisp :exports none :tangle no
|
#+begin_src emacs-lisp :exports none :tangle no
|
||||||
|
;; This asks for a file which it uses to store the processed org
|
||||||
|
;; data with the includes into. It can be anything and can safely
|
||||||
|
;; be deleted afterwards. I think README.org is a good file to
|
||||||
|
;; pick if using a repository.
|
||||||
(defun tangle-literate-config ()
|
(defun tangle-literate-config ()
|
||||||
"Tangle all my literate configuration files."
|
"Tangle config files with proper include handling."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((org-confirm-babel-evaluate nil)
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
(files '("config.org"
|
;; Create a temporary buffer with expanded includes
|
||||||
"extra/feed.org"
|
(with-temp-buffer
|
||||||
"extra/email.org"
|
(insert-file-contents "config.org")
|
||||||
"extra/social.org")))
|
(org-mode)
|
||||||
(dolist (file files)
|
;; This expands all #+INCLUDE directives
|
||||||
(when (file-exists-p file)
|
(org-export-expand-include-keyword)
|
||||||
(message "Tangling %s..." (file-name-nondirectory file))
|
;; Now tangle from this buffer which has everything in one place
|
||||||
(org-babel-tangle-file file)))
|
(org-babel-tangle nil "init.el"))
|
||||||
(message "All configuration files tangled!")))
|
(message "Configuration tangled!")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :exports none
|
#+BEGIN_SRC emacs-lisp :exports none
|
||||||
@@ -114,18 +118,6 @@ loading as a blank slate with only the scratch buffer open.
|
|||||||
;; End:
|
;; End:
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Basic Editing
|
|
||||||
|
|
||||||
The most crucial settings in the whole configuration. Despite the look of my
|
|
||||||
configuration I do *indeed* use it as an editor.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq initial-buffer-choice t) ;;*scratch*
|
|
||||||
(setq-default standard-indent 2)
|
|
||||||
(setq-default tab-width 2)
|
|
||||||
(editorconfig-mode)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Package Management
|
* Package Management
|
||||||
|
|
||||||
I am using [[https://github.com/progfolio/elpaca][Elpaca]] as my package manager. I've found it to be quite quick, and easy to
|
I am using [[https://github.com/progfolio/elpaca][Elpaca]] as my package manager. I've found it to be quite quick, and easy to
|
||||||
@@ -201,6 +193,18 @@ features.
|
|||||||
(setq use-package-always-ensure t))
|
(setq use-package-always-ensure t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Basic Editing
|
||||||
|
|
||||||
|
The most crucial settings in the whole configuration. Despite the look of my
|
||||||
|
configuration I do *indeed* use it as an editor.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq initial-buffer-choice t) ;;*scratch*
|
||||||
|
(setq-default standard-indent 2)
|
||||||
|
(setq-default tab-width 2)
|
||||||
|
(editorconfig-mode)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Garbage Collection
|
* Garbage Collection
|
||||||
|
|
||||||
There's a lot of clashes that can happen with regards to performance, and
|
There's a lot of clashes that can happen with regards to performance, and
|
||||||
@@ -478,14 +482,6 @@ on a system by system basis.
|
|||||||
;;;
|
;;;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
# For now I'm not using headers here and letting them be defined in the org files
|
|
||||||
# themselves.
|
|
||||||
#+INCLUDE: "extra/email.org" :minlevel 1
|
|
||||||
|
|
||||||
#+INCLUDE: "extra/feed.org" :minlevel 1
|
|
||||||
|
|
||||||
#+INCLUDE: "extra/social.org" :minlevel 1
|
|
||||||
|
|
||||||
* Hail Hydra?!
|
* Hail Hydra?!
|
||||||
|
|
||||||
I find that [[https://github.com/abo-abo/hydra][Hydra]] is great for providing visual menus for tasks that might
|
I find that [[https://github.com/abo-abo/hydra][Hydra]] is great for providing visual menus for tasks that might
|
||||||
@@ -1287,6 +1283,7 @@ the package.
|
|||||||
(c-ts-mode . lsp-deferred)
|
(c-ts-mode . lsp-deferred)
|
||||||
(clojure-ts-mode . lsp-deferred)
|
(clojure-ts-mode . lsp-deferred)
|
||||||
(elixir-ts-mode . lsp-deferred)
|
(elixir-ts-mode . lsp-deferred)
|
||||||
|
(gleam-ts-mode . lsp-deferred)
|
||||||
(rust-ts-mode . lsp-deferred)
|
(rust-ts-mode . lsp-deferred)
|
||||||
(slint-mode . lsp-deferred)
|
(slint-mode . lsp-deferred)
|
||||||
(zig-mode . lsp-deferred)
|
(zig-mode . lsp-deferred)
|
||||||
@@ -1360,6 +1357,10 @@ bother with an explanation on each.
|
|||||||
(clojure-ts-mode . rainbow-delimiters-mode)
|
(clojure-ts-mode . rainbow-delimiters-mode)
|
||||||
(clojure-ts-mode . clj-refactor-mode)))
|
(clojure-ts-mode . clj-refactor-mode)))
|
||||||
|
|
||||||
|
;; Gleam
|
||||||
|
(use-package gleam-ts-mode
|
||||||
|
:mode (rx ".gleam" eos))
|
||||||
|
|
||||||
(use-package cider
|
(use-package cider
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|||||||
48
config.org
48
config.org
@@ -7,19 +7,23 @@
|
|||||||
#+LATEX_HEADER: \lstset{breaklines=true, breakatwhitespace=true, basicstyle=\ttfamily\footnotesize, columns=fullflexible}
|
#+LATEX_HEADER: \lstset{breaklines=true, breakatwhitespace=true, basicstyle=\ttfamily\footnotesize, columns=fullflexible}
|
||||||
|
|
||||||
#+begin_src emacs-lisp :exports none :tangle no
|
#+begin_src emacs-lisp :exports none :tangle no
|
||||||
|
;; This asks for a file which it uses to store the processed org
|
||||||
|
;; data with the includes into. It can be anything and can safely
|
||||||
|
;; be deleted afterwards. I think README.org is a good file to
|
||||||
|
;; pick if using a repository.
|
||||||
(defun tangle-literate-config ()
|
(defun tangle-literate-config ()
|
||||||
"Tangle all my literate configuration files."
|
"Tangle config files with proper include handling."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((org-confirm-babel-evaluate nil)
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
(files '("config.org"
|
;; Create a temporary buffer with expanded includes
|
||||||
"extra/feed.org"
|
(with-temp-buffer
|
||||||
"extra/email.org"
|
(insert-file-contents "config.org")
|
||||||
"extra/social.org")))
|
(org-mode)
|
||||||
(dolist (file files)
|
;; This expands all #+INCLUDE directives
|
||||||
(when (file-exists-p file)
|
(org-export-expand-include-keyword)
|
||||||
(message "Tangling %s..." (file-name-nondirectory file))
|
;; Now tangle from this buffer which has everything in one place
|
||||||
(org-babel-tangle-file file)))
|
(org-babel-tangle nil "init.el"))
|
||||||
(message "All configuration files tangled!")))
|
(message "Configuration tangled!")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :exports none
|
#+BEGIN_SRC emacs-lisp :exports none
|
||||||
@@ -114,18 +118,6 @@ loading as a blank slate with only the scratch buffer open.
|
|||||||
;; End:
|
;; End:
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Basic Editing
|
|
||||||
|
|
||||||
The most crucial settings in the whole configuration. Despite the look of my
|
|
||||||
configuration I do *indeed* use it as an editor.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq initial-buffer-choice t) ;;*scratch*
|
|
||||||
(setq-default standard-indent 2)
|
|
||||||
(setq-default tab-width 2)
|
|
||||||
(editorconfig-mode)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Package Management
|
* Package Management
|
||||||
|
|
||||||
I am using [[https://github.com/progfolio/elpaca][Elpaca]] as my package manager. I've found it to be quite quick, and easy to
|
I am using [[https://github.com/progfolio/elpaca][Elpaca]] as my package manager. I've found it to be quite quick, and easy to
|
||||||
@@ -201,6 +193,8 @@ features.
|
|||||||
(setq use-package-always-ensure t))
|
(setq use-package-always-ensure t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+INCLUDE: "config/editing.org" :minlevel 1
|
||||||
|
|
||||||
* Garbage Collection
|
* Garbage Collection
|
||||||
|
|
||||||
There's a lot of clashes that can happen with regards to performance, and
|
There's a lot of clashes that can happen with regards to performance, and
|
||||||
@@ -478,14 +472,6 @@ on a system by system basis.
|
|||||||
;;;
|
;;;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
# For now I'm not using headers here and letting them be defined in the org files
|
|
||||||
# themselves.
|
|
||||||
#+INCLUDE: "extra/email.org" :minlevel 1
|
|
||||||
|
|
||||||
#+INCLUDE: "extra/feed.org" :minlevel 1
|
|
||||||
|
|
||||||
#+INCLUDE: "extra/social.org" :minlevel 1
|
|
||||||
|
|
||||||
* Hail Hydra?!
|
* Hail Hydra?!
|
||||||
|
|
||||||
I find that [[https://github.com/abo-abo/hydra][Hydra]] is great for providing visual menus for tasks that might
|
I find that [[https://github.com/abo-abo/hydra][Hydra]] is great for providing visual menus for tasks that might
|
||||||
|
|||||||
11
config/editing.org
Normal file
11
config/editing.org
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
* Basic Editing
|
||||||
|
|
||||||
|
The most crucial settings in the whole configuration. Despite the look of my
|
||||||
|
configuration I do *indeed* use it as an editor.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq initial-buffer-choice t) ;;*scratch*
|
||||||
|
(setq-default standard-indent 2)
|
||||||
|
(setq-default tab-width 2)
|
||||||
|
(editorconfig-mode)
|
||||||
|
#+end_src
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
#+PROPERTY: header-args :tangle email.el
|
|
||||||
|
|
||||||
Incoming email is handled by [[https://notmuchmail.org][notmuch]]. Outgoing is via [[https://github.com/marlam/msmtp][msmtp]]
|
Incoming email is handled by [[https://notmuchmail.org][notmuch]]. Outgoing is via [[https://github.com/marlam/msmtp][msmtp]]
|
||||||
|
|
||||||
This is a pretty simple implementation without a lot of search queries, and
|
This is a pretty simple implementation without a lot of search queries, and
|
||||||
list handling. As I get more comfortable with using emacs as an email client
|
list handling. As I get more comfortable with using emacs as an email client
|
||||||
I'll try to get fancier.
|
I'll try to get fancier.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp :tangle "email.el"
|
||||||
;; Email/notmuch settings -*- lexical-binding: t; -*-
|
;; Email/notmuch settings -*- lexical-binding: t; -*-
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
:init
|
:init
|
||||||
|
|||||||
@@ -1,25 +1,8 @@
|
|||||||
#+PROPERTY: header-args :tangle "feed.el" :noweb yes
|
|
||||||
|
|
||||||
I get a lot of my news, and updates via Atom/RSS feeds. If I'm going to
|
I get a lot of my news, and updates via Atom/RSS feeds. If I'm going to
|
||||||
browse them in emacs I use elfeed.
|
browse them in emacs I use elfeed.
|
||||||
|
|
||||||
#+name: header
|
|
||||||
#+begin_src emacs-lisp :exports none
|
|
||||||
;;; elfeed -- Just my elfeed config. -*- lexical-binding: t; -*-
|
|
||||||
;;; Commentary:
|
|
||||||
;;; Nothing yet.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: footer
|
|
||||||
#+begin_src emacs-lisp :exports none
|
|
||||||
(provide 'feed)
|
|
||||||
;;; feed.el ends here
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: feed-src
|
#+name: feed-src
|
||||||
#+begin_src emacs-lisp :exports code
|
#+begin_src emacs-lisp :tangle "feed.el" :exports code
|
||||||
|
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:defer t
|
:defer t
|
||||||
@@ -56,9 +39,5 @@ browse them in emacs I use elfeed.
|
|||||||
:after (elfeed)
|
:after (elfeed)
|
||||||
:config
|
:config
|
||||||
(elfeed-goodies/setup))
|
(elfeed-goodies/setup))
|
||||||
|
|
||||||
<<footer>>
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS: feed-src
|
|
||||||
: feed
|
|
||||||
|
|||||||
@@ -1,40 +1,15 @@
|
|||||||
#+PROPERTY: header-args :tangle "social.el" :exports code
|
|
||||||
|
|
||||||
* Mastodon, and other tidbits
|
* Mastodon, and other tidbits
|
||||||
|
|
||||||
#+name: header
|
|
||||||
#+begin_src emacs-lisp :exports none
|
|
||||||
;;; social -- Provides social features -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
;;; Only provides Mastodon, and discord presence currently.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+RESULTS: header
|
|
||||||
|
|
||||||
** Mastodon
|
** Mastodon
|
||||||
|
|
||||||
Just a little package for browsing mastodon. I don't use it much, but
|
Just a little package for browsing mastodon. I don't use it much, but
|
||||||
it's deferred and doesn't take much space.
|
it's deferred and doesn't take much space.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp :tangle "social.el"
|
||||||
<<header>>
|
|
||||||
|
|
||||||
(use-package mastodon
|
(use-package mastodon
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(setq mastodon-instance-url "https://mastodon.social"
|
(setq mastodon-instance-url "https://mastodon.social"
|
||||||
mastodon-active-user "xulfer"))
|
mastodon-active-user "xulfer"))
|
||||||
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+name: footer
|
|
||||||
#+begin_src emacs-lisp :exports none
|
|
||||||
;;; social.el ends here
|
|
||||||
|
|
||||||
(provide 'social)
|
|
||||||
|
|
||||||
#+end_src
|
|
||||||
|
|||||||
Reference in New Issue
Block a user