Add more headlines
Makes it easier to link to a specific subpart of my config
This commit is contained in:
parent
268ce651d1
commit
6a48fd628d
61
config.org
61
config.org
|
@ -1,7 +1,10 @@
|
||||||
#+STARTUP: content
|
#+STARTUP: content
|
||||||
* Table of Contents :TOC_3:
|
* Table of Contents :TOC_3:
|
||||||
- [[#misc][Misc]]
|
- [[#misc][Misc]]
|
||||||
|
- [[#lexical-bindings][Lexical bindings]]
|
||||||
|
- [[#dir-local-variables][Dir local variables]]
|
||||||
- [[#theme][Theme]]
|
- [[#theme][Theme]]
|
||||||
|
- [[#main-theme][Main theme]]
|
||||||
- [[#dark-theme-toggle][Dark theme toggle]]
|
- [[#dark-theme-toggle][Dark theme toggle]]
|
||||||
- [[#font][Font]]
|
- [[#font][Font]]
|
||||||
- [[#line-numbers][Line numbers]]
|
- [[#line-numbers][Line numbers]]
|
||||||
|
@ -9,30 +12,52 @@
|
||||||
- [[#programming][Programming]]
|
- [[#programming][Programming]]
|
||||||
- [[#rust][Rust]]
|
- [[#rust][Rust]]
|
||||||
- [[#cc][C/C++]]
|
- [[#cc][C/C++]]
|
||||||
|
- [[#default-style][Default style]]
|
||||||
|
- [[#flycheck][Flycheck]]
|
||||||
- [[#org-mode][Org mode]]
|
- [[#org-mode][Org mode]]
|
||||||
- [[#directory][Directory]]
|
- [[#directory][Directory]]
|
||||||
- [[#appearance][Appearance]]
|
- [[#appearance][Appearance]]
|
||||||
|
- [[#disable-fancy-stars][Disable fancy stars]]
|
||||||
|
- [[#dont-hide-leading-stars][Don't hide leading stars]]
|
||||||
|
- [[#fancier-ellipsis-indicator][Fancier ellipsis indicator]]
|
||||||
- [[#agenda-setup][Agenda setup]]
|
- [[#agenda-setup][Agenda setup]]
|
||||||
|
- [[#default-task-keywords][Default task keywords]]
|
||||||
|
- [[#org-capture-setup][Org capture setup]]
|
||||||
|
- [[#main-agenda-view][Main agenda view]]
|
||||||
|
- [[#habits][Habits]]
|
||||||
- [[#org-ids][Org IDs]]
|
- [[#org-ids][Org IDs]]
|
||||||
- [[#roam][Roam]]
|
- [[#roam][Roam]]
|
||||||
|
- [[#roam-directory][Roam Directory]]
|
||||||
|
- [[#graph-browser][Graph browser]]
|
||||||
|
- [[#roam-link-font-face][Roam link font face]]
|
||||||
|
- [[#roam-capture-template][Roam capture template]]
|
||||||
- [[#org-roam-server][Org Roam Server]]
|
- [[#org-roam-server][Org Roam Server]]
|
||||||
- [[#export-backends][Export backends]]
|
- [[#export-backends][Export backends]]
|
||||||
- [[#doom-specific][Doom specific]]
|
- [[#doom-specific][Doom specific]]
|
||||||
|
|
||||||
* Misc
|
* Misc
|
||||||
|
|
||||||
|
** Lexical bindings
|
||||||
|
|
||||||
Enable lexical binding, of course...
|
Enable lexical binding, of course...
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;;; -*- lexical-binding: t; -*-
|
;;; -*- lexical-binding: t; -*-
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Dir local variables
|
||||||
|
|
||||||
|
Disable these because I don't use them and don't want to get prompted by them in
|
||||||
|
some projects.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq enable-dir-local-variables nil)
|
(setq enable-dir-local-variables nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Theme
|
* Theme
|
||||||
|
|
||||||
|
** Main theme
|
||||||
|
|
||||||
A list of all doom themes can be found here:
|
A list of all doom themes can be found here:
|
||||||
|
|
||||||
https://github.com/hlissner/emacs-doom-themes
|
https://github.com/hlissner/emacs-doom-themes
|
||||||
|
@ -126,6 +151,8 @@ nice.
|
||||||
|
|
||||||
** C/C++
|
** C/C++
|
||||||
|
|
||||||
|
*** Default style
|
||||||
|
|
||||||
Setup the default format for C/C++ editing.
|
Setup the default format for C/C++ editing.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -134,6 +161,8 @@ Setup the default format for C/C++ editing.
|
||||||
(setq c-basic-offset 2))
|
(setq c-basic-offset 2))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Flycheck
|
||||||
|
|
||||||
Flycheck never works well for C / C++ without configuration or a CMake build
|
Flycheck never works well for C / C++ without configuration or a CMake build
|
||||||
system. Let's disable it.
|
system. Let's disable it.
|
||||||
|
|
||||||
|
@ -154,13 +183,15 @@ Set a default directory for all my org-mode files.
|
||||||
|
|
||||||
** Appearance
|
** Appearance
|
||||||
|
|
||||||
Disable fancy stars:
|
*** Disable fancy stars
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(remove-hook 'org-mode-hook #'org-superstar-mode)
|
(remove-hook 'org-mode-hook #'org-superstar-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Don't hide leading stars:
|
*** Don't hide leading stars
|
||||||
|
|
||||||
|
Currently doesn't work due to [[https://github.com/hlissner/doom-emacs/issues/3076][hlissner/doom-emacs#3076]]
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
|
@ -169,7 +200,7 @@ Don't hide leading stars:
|
||||||
org-adapt-indentation nil))
|
org-adapt-indentation nil))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Fancier ellipsis indicator:
|
*** Fancier ellipsis indicator
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-ellipsis " ▼ ")
|
(setq org-ellipsis " ▼ ")
|
||||||
|
@ -177,6 +208,8 @@ Fancier ellipsis indicator:
|
||||||
|
|
||||||
** Agenda setup
|
** Agenda setup
|
||||||
|
|
||||||
|
*** Default task keywords
|
||||||
|
|
||||||
Here are the [[https://orgmode.org/manual/TODO-Extensions.html#TODO-Extensions][keywords]] I'm using to track task progress. I'm also making use of
|
Here are the [[https://orgmode.org/manual/TODO-Extensions.html#TODO-Extensions][keywords]] I'm using to track task progress. I'm also making use of
|
||||||
some automatic [[https://orgmode.org/manual/Tracking-TODO-state-changes.html#Tracking-TODO-state-changes][state changes]].
|
some automatic [[https://orgmode.org/manual/Tracking-TODO-state-changes.html#Tracking-TODO-state-changes][state changes]].
|
||||||
|
|
||||||
|
@ -200,6 +233,8 @@ some automatic [[https://orgmode.org/manual/Tracking-TODO-state-changes.html#Tra
|
||||||
"[X](D)"))))
|
"[X](D)"))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Org capture setup
|
||||||
|
|
||||||
Of course I also need to setup [[https://orgmode.org/manual/Capture-templates.html][capture templates]]:
|
Of course I also need to setup [[https://orgmode.org/manual/Capture-templates.html][capture templates]]:
|
||||||
|
|
||||||
The first one just prompts me for a new task to add to my inbox, I can then
|
The first one just prompts me for a new task to add to my inbox, I can then
|
||||||
|
@ -218,6 +253,8 @@ papers / books to read.
|
||||||
:immediate-finish t))))
|
:immediate-finish t))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Main agenda view
|
||||||
|
|
||||||
All these tasks, once captured, are then centralized in my [[https://orgmode.org/guide/Agenda-Views.html][agenda view]].
|
All these tasks, once captured, are then centralized in my [[https://orgmode.org/guide/Agenda-Views.html][agenda view]].
|
||||||
|
|
||||||
I'm using multiple categories to organize tasks, depending on their triage /
|
I'm using multiple categories to organize tasks, depending on their triage /
|
||||||
|
@ -273,6 +310,8 @@ I also remove the block separators in the agenda view:
|
||||||
(setq org-agenda-block-separator ""))
|
(setq org-agenda-block-separator ""))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Habits
|
||||||
|
|
||||||
Let's enable the =org-habit= module:
|
Let's enable the =org-habit= module:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -292,18 +331,24 @@ links to work:
|
||||||
|
|
||||||
Setup for [[https://github.com/jethrokuan/org-roam][org-roam]].
|
Setup for [[https://github.com/jethrokuan/org-roam][org-roam]].
|
||||||
|
|
||||||
|
*** Roam Directory
|
||||||
|
|
||||||
First, set a directory where =org-roam= will index things.
|
First, set a directory where =org-roam= will index things.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-roam-directory (expand-file-name "notes/" org-directory))
|
(setq org-roam-directory (expand-file-name "notes/" org-directory))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Graph browser
|
||||||
|
|
||||||
Instruct =org-roam= to use =firefox-developer-edition= to open the graph:
|
Instruct =org-roam= to use =firefox-developer-edition= to open the graph:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-roam-graph-viewer (executable-find "firefox-developer-edition"))
|
(setq org-roam-graph-viewer (executable-find "firefox-developer-edition"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Roam link font face
|
||||||
|
|
||||||
Change link color for =org-roam= links, to distinguish them from standard Org
|
Change link color for =org-roam= links, to distinguish them from standard Org
|
||||||
links:
|
links:
|
||||||
|
|
||||||
|
@ -312,6 +357,8 @@ links:
|
||||||
(set-face-attribute 'org-roam-link nil :foreground "#FF8860"))
|
(set-face-attribute 'org-roam-link nil :foreground "#FF8860"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Roam capture template
|
||||||
|
|
||||||
Customize the capture templates:
|
Customize the capture templates:
|
||||||
|
|
||||||
- the first one is [[https://github.com/jethrokuan/org-roam/blob/772505ba70c073ebc7905c4fcb8b9cc3759c775a/org-roam-capture.el#L81][the default one]], I just removed the timestamp from the file
|
- the first one is [[https://github.com/jethrokuan/org-roam/blob/772505ba70c073ebc7905c4fcb8b9cc3759c775a/org-roam-capture.el#L81][the default one]], I just removed the timestamp from the file
|
||||||
|
@ -346,7 +393,10 @@ Customize the capture templates:
|
||||||
:unnarrowed t))))
|
:unnarrowed t))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Also setup daily captures templates:
|
**** Roam daily capture templates
|
||||||
|
|
||||||
|
Also setup daily captures templates, mainly used to store them in a =journal/=
|
||||||
|
directory instead of at the root.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(after! org-roam
|
(after! org-roam
|
||||||
|
@ -360,6 +410,9 @@ Also setup daily captures templates:
|
||||||
|
|
||||||
*** Org Roam Server
|
*** Org Roam Server
|
||||||
|
|
||||||
|
=org-roam-server= provides a fancy JS interface to visualize the graph. Just
|
||||||
|
needs to be loaded, along with its dependency =simple-httpd=.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package! simple-httpd)
|
(use-package! simple-httpd)
|
||||||
(use-package! org-roam-server)
|
(use-package! org-roam-server)
|
||||||
|
|
Loading…
Reference in a new issue