~thecatster/.emacs.d

8f1de15493e2037f6a14e03840dd82868dd2e0e9 — Daniel Rose 2 years ago 4fc2369
Optimise performance even further
5 files changed, 737 insertions(+), 770 deletions(-)

M early-init.el
M emacs.org
M exwm.org
M init.el
M lisp/catsters-exwm.el
M early-init.el => early-init.el +2 -1
@@ 6,4 6,5 @@
(setq package-enable-at-startup nil)

;; Again, /inspired/ from Doom, ensure Engineered is running in this directory.
(setq user-emacs-directory (file-name-directory load-file-name))
(setq user-emacs-directory (expand-file-name "~/.local/emacs/")
      url-history-file (expand-file-name "url/history" user-emacs-directory))

M emacs.org => emacs.org +445 -480
@@ 63,19 63,17 @@ more.
  - [[#convenient-features][Convenient Features]]
  - [[#flycheck][Flycheck]]
  - [[#lsp][LSP]]
  - [[#dap][DAP]]
  - [[#languages][Languages]]
- [[#org-mode][Org Mode]]
  - [[#better-defaults][Better Defaults]]
  - [[#blog-agenda-and-capture][Blog, Agenda, and Capture]]
  - [[#org-journal][Org Journal]]
  - [[#org-roam][Org Roam]]
  - [[#async-babel-tangle][Async Babel Tangle]]
  - [[#other-settings][Other Settings]]
- [[#exwm][EXWM]]

* About This Configuration
Originally, nicknamed ``Engineered Emacs,'' this configuration was my attempt to compete with Doom, Prelude, and Spacemacs, providing a simple yet effective setup for typical languages found in embedded engineering and data science. However, like all others, I eventually realized I want to use Emacs for more, and I can't call it a proper distribution or beginners' configuration if I include everything I want.
Originally, nicknamed "Engineered Emacs," this configuration was my attempt to compete with Doom, Prelude, and Spacemacs, providing a simple yet effective setup for typical languages found in embedded engineering and data science. However, like all others, I eventually realized I want to use Emacs for more, and I can't call it a proper distribution or beginners' configuration if I include everything I want.

Therefore, I decided the best course of action was to just make it my own configuration, included with my dotfiles, and include all that I need to work efficiently instead of worrying about everyone else.



@@ 92,7 90,8 @@ implies, earlier than the rest.
(setq package-enable-at-startup nil)

;; Again, /inspired/ from Doom, ensure Engineered is running in this directory.
(setq user-emacs-directory (file-name-directory load-file-name))
(setq user-emacs-directory (expand-file-name "~/.local/emacs/")
      url-history-file (expand-file-name "url/history" user-emacs-directory))
#+END_SRC

* Startup


@@ 105,25 104,9 @@ and I pulled out the parts I thought were best and still needed.
(defconst IS-MAC     (eq system-type 'darwin))
(defconst IS-LINUX   (eq system-type 'gnu/linux))

(defconst engineered-version "1.1.0"
(defconst engineered-version "2.4.0"
  "Current version of Engineered Emacs.")

(defconst engineered-emacs-dir user-emacs-directory
  "The path to the currently loaded .emacs.d directory. Must end with a slash.")

(defconst engineered-local-dir
  (let ((localdir (getenv-internal "EELOCALDIR")))
    (if localdir
	      (expand-file-name (file-name-as-directory localdir))
      (concat engineered-emacs-dir ".local/")))
  "Root directory for local storage.")

(defconst engineered-etc-dir (concat engineered-local-dir "etc/")
  "Directory for non-volatile local storage. For not often changing files.")

(defconst engineered-cache-dir (concat engineered-local-dir "cache/")
  "Directory for volatile local storage.")

;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are
;; compiled ahead-of-time when they are installed and site files are compiled
;; when gccemacs is installed.


@@ 150,18 133,6 @@ and I pulled out the parts I thought were best and still needed.
      inhibit-default-init t
      byte-compile-warnings '(not cl-functions))

;;; Yeah, the littering of my dir is a bit annoying
(setq async-byte-compile-log-file  (concat engineered-etc-dir "async-bytecomp.log")
      desktop-dirname              (concat engineered-etc-dir "desktop")
      desktop-base-file-name       "autosave"
      desktop-base-lock-name       "autosave-lock"
      pcache-directory             (concat engineered-cache-dir "pcache/")
      request-storage-directory    (concat engineered-cache-dir "request")
      shared-game-score-directory  (concat engineered-etc-dir "shared-game-score/"))

;; Effectively "disable" customize, since programmtic is better for repeatability
(setq custom-file (make-temp-file "emacs-custom"))

;;; Optimizations!
;; Don't rely on case insensitivity.
(setq auto-mode-case-fold nil)


@@ 198,9 169,6 @@ and I pulled out the parts I thought were best and still needed.
;; Slow the UI updates
(setq idle-update-delay 1.0)

;; Slows the LSP hints
(setq lsp-idle-delay 0.500)

;; Increase memory usage, but increase performance. No thank you, font compacting!
(setq inhibit-compacting-font-caches t)



@@ 243,7 211,7 @@ and I pulled out the parts I thought were best and still needed.
      tls-program '("gnutls-cli -p %p %h"))

;; Emacs stores `authinfo' in $HOME and in plain-text. WHY!?
(setq auth-sources (list (concat engineered-etc-dir "authinfo.gpg")
(setq auth-sources (list (concat user-emacs-directory "authinfo.gpg")
                         "~/.authinfo"
			                   "~/.authinfo.gpg"))



@@ 255,6 223,7 @@ and I pulled out the parts I thought were best and still needed.
;; UTF-8!
(when (fboundp 'set-charset-priority)
  (set-charset-priority 'unicode))
(set-default-coding-systems 'utf-8)
(prefer-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
;; Of course Windows does it's own thing.


@@ 387,6 356,7 @@ Allow me to pop multiple times when jumping back to a mark.
Always update files on change globally.

#+BEGIN_SRC emacs-lisp
(setq global-auto-revert-non-file-buffers t)
(global-auto-revert-mode 1)
#+END_SRC



@@ 394,19 364,35 @@ I used to always use relative line numbers, and I cannot tell if it is
a placebo or not, but absolute feels faster.

#+BEGIN_SRC emacs-lisp
(global-display-line-numbers-mode 1)
  (dolist (mode '(text-mode-hook
                  prog-mode-hook
                  conf-mode-hook))
    (add-hook mode (lambda () (display-line-numbers-mode 1))))

  (dolist (mode '(org-mode-hook))
    (add-hook mode (lambda ()
                     (display-line-numbers-mode 0)
                     (setq-local global-hl-line-mode nil))))
(dolist (mode '(vterm-mode-hook))
  (add-hook mode (lambda ()
                   (display-line-numbers-mode 0)
                   (setq-local global-hl-line-mode nil))))
  (dolist (mode '(magit-mode-hook))
    (add-hook mode (lambda ()
                     (display-line-numbers-mode 0)
                     (setq-local global-hl-line-mode nil))))
#+END_SRC

Update that load path.

#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path (concat user-emacs-directory "lisp/"))
(add-to-list 'load-path "~/.emacs.d/lisp/")
#+END_SRC

Wrapping lines is great, especially when many commands work on visual lines.
Scroll one line at a time with the keyboard.

#+BEGIN_SRC emacs-lisp
(global-visual-line-mode 1)
(setq scroll-step 1)
#+END_SRC

I don't feel like writing the whole word!


@@ 439,7 425,48 @@ emojis.
#+BEGIN_SRC emacs-lisp
(add-to-list 'default-frame-alist '(font . "JetBrainsMono Nerd Font 11"))
(use-package emojify
  :hook (after-init . global-emojify-mode))
  :hook (erc-mode . emojify-mode)
  :commands emojify-mode)
#+END_SRC

Hide annoying minor modes that will always be on anyway.

#+BEGIN_SRC emacs-lisp
(use-package diminish)
#+END_SRC

Improve text scaling.

#+BEGIN_SRC emacs-lisp
(use-package default-text-scale
  :defer 1
  :config
  (default-text-scale-mode))
#+END_SRC

The normal auto-save mode annoys me, but I've found super-save to be
useful.

#+BEGIN_SRC emacs-lisp
(use-package super-save
  :defer 1
  :diminish super-save-mode
  :config
  (super-save-mode +1)
  (setq super-save-auto-save-when-idle t))
#+END_SRC

Buffer placement can be strange in default Emacs, so let's improve
that.

#+BEGIN_SRC emacs-lisp
(setq display-buffer-base-action
      '(display-buffer-reuse-mode-window
        display-buffer-reuse-window
        display-buffer-same-window))

;; If a popup does happen, don't resize windows to be equal-sized
(setq even-window-sizes nil)
#+END_SRC

Dired is my favourite file manager, but it can be improved even more


@@ 472,7 499,6 @@ file manager.
              ("W" . dired-ranger-copy)
              ("X" . dired-ranger-move)
              ("Y" . dired-ranger-paste)))

#+END_SRC

Auto revert Dired as well, to ensure the latest information is


@@ 522,17 548,22 @@ I've decided to try out the Doom modeline, since it looks quite clean
and everyone seems to be using it!

#+BEGIN_SRC emacs-lisp
(use-package doom-modeline
  :hook (after-init . doom-modeline-mode)
  :custom
  (doom-modeline-icon t)
  (doom-modeline-major-mode-icon t)
  (doom-modeline-major-mode-color-icon t)
  (doom-modeline-buffer-state-icon t)
  (doom-modeline-minor-modes t)
  (doom-modeline-buffer-modification-icon t)
  (doom-modeline-bar-width 3)
  (doom-modeline-height 15))
  (use-package doom-modeline
    :hook (after-init . doom-modeline-init)
    :custom-face
    (mode-line ((t (:height 0.85))))
    (mode-line-inactive ((t (:height 0.85))))
    :custom
    (doom-modeline-height 15)
    (doom-modeline-bar-width 6)
    (doom-modeline-lsp t)
    (doom-modeline-github nil)
    (doom-modeline-mu4e t)
    (doom-modeline-irc t)
    (doom-modeline-minor-modes t)
    (doom-modeline-persp-name nil)
    (doom-modeline-buffer-file-name-style 'truncate-except-project)
    (doom-modeline-major-mode-icon t))
#+END_SRC

** PGP


@@ 884,22 915,30 @@ Especially when learning the Emacs keybindings, Which Key is quite helpful.

#+BEGIN_SRC emacs-lisp
(use-package which-key
  :init
  (which-key-mode 1)
  :diminish which-key-mode
  :config
  (setq which-key-idle-delay 0.3)
  (setq which-key-separator " ")
  (setq which-key-prefix-prefix "+")
  (which-key-mode 1))
  (setq which-key-prefix-prefix "+"))
#+END_SRC

** Projectile
I had never really used treemacs/neotree in Doom, but projectile was a must.

#+BEGIN_SRC emacs-lisp
(use-package projectile
  :config
  (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  (setq projectile-require-project-root nil)
  (setq projectile-mode-line "")
  (projectile-mode 1))
  (use-package projectile
    :diminish projectile-mode
    :config
    (setq projectile-require-project-root nil)
    (setq projectile-mode-line "")
    (projectile-mode)
    :demand t
    :bind-keymap ("C-c p" . projectile-command-map)
    :init
    (when (file-directory-p "~/Projects/Programming")
      (setq projectile-project-search-path '("~/Projects/Programming"))))
#+END_SRC

** CRUX


@@ 912,7 951,6 @@ package as well. Great, because it's one of my most used!
  ;; ispell words then abbrev
  (setq save-abbrevs 'silently)
  (setq-default abbrev-mode t)

  ;; Replace default commands with CRUX
  (global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line)
  (global-set-key (kbd "C-c o") #'crux-open-with)


@@ 921,6 959,20 @@ package as well. Great, because it's one of my most used!
  (global-set-key [remap kill-whole-line] #'crux-kill-whole-line))
#+END_SRC

** Ace Window
   Quickly switch between buffers and windows instead of ~C-x o~.

   #+BEGIN_SRC emacs-lisp
     (use-package ace-window
       :bind (("M-o" . ace-window))
       :custom
       (aw-scope 'frame)
       (aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
       (aw-minibuffer-flag t)
       :config
       (ace-window-display-mode 1))
   #+END_SRC

** No Littering
This is nice to have, so why not add it.



@@ 935,121 987,6 @@ This is nice to have, so why not add it.
  (setq custom-file (expand-file-name "custom.el" user-emacs-directory)))
#+END_SRC

** Custom Keybindings
These are just plain convenient, and allow for more ergonomic access
to really long commands. I use M-SPC as my leader key, since SPC is
obviously already taken.

All the following keybindings are demonstrated in sub-headings in the tables below.
*** EWW

| COMMAND          | DESCRIPTION                   | KEYBINDING |
|------------------+-------------------------------+------------|
| eww              | /EWW - Emacs Web Wowser/        | M-SPC e w  |
| eww-reload       | /EWW - Reload page/             | M-SPC e R  |
| eww-search-words | /EWW - Search using DuckDuckGo/ | M-SPC e s  |
*** Elisp Evaluation

| COMMAND         | DESCRIPTION                                    | KEYBINDING |
|-----------------+------------------------------------------------+------------|
| eval-buffer     | /Evaluate elisp in buffer/                     | M-SPC e b  |
| eval-defun      | /Evaluate the defun containing or after point/ | M-SPC e d  |
| eval-expression | /Evaluate an elisp expression/                 | M-SPC e e  |
| eval-last-sexp  | /Evaluate elisp expression before point/       | M-SPC e l  |
| eval-region     | /Evaluate elisp in region/                     | M-SPC e r  |
*** Dired

| COMMAND                                   | DESCRIPTION                                       | KEYBINDING |
|-------------------------------------------+---------------------------------------------------+------------|
| dired                                     | /Open dired file manager/                         | M-SPC d d  |
| dired-jump                                | /Jump to current directory in dired/              | M-SPC d j  |
| (in dired) peep-dired                     | /Toggle image previews within dired/              | M-SPC d p  |
| (in dired) dired-view-file                | /View file in dired/                              | M-SPC d v  |
*** Common Files

| PATH TO FILE           | DESCRIPTION      | KEYBINDING |
|------------------------+------------------+------------|
| ~/Org/agenda.org       | /Edit agenda file/ | M-SPC - a  |
| ~/.emacs.d/config.org" | /Edit config.org/  | M-SPC - c  |
*** Applications

| COMMAND | DESCRIPTION                | KEYBINDING |
|---------+----------------------------+------------|
| mu4e    | /Open the email client mu4e/ | M-SPC o m  |
*** Org Mode

| COMMAND     | DESCRIPTION                                    | KEYBINDING |
|-------------+------------------------------------------------+------------|
| org-agenda  | /View agenda in org mode/                      | M-SPC c a  |
| org-capture | /Quickly capture something in todo or journal/ | M-SPC c c  |
*** Keybindings
If you need to see what commands are available, I recommend reading
the tables above instead.

#+BEGIN_SRC emacs-lisp
;; Convenient for things I do not do too often, but are convenient
(global-unset-key (kbd "M-SPC"))
;; A waste of a keybinding when using EXWM
(global-unset-key (kbd "C-z"))

;; Window actions
(bind-keys :map global-map
           :prefix-map my-window-map
           :prefix "M-SPC w"
           ("-" . split-window-below)
           ("|" . split-window-right)
           ("d" . delete-window)
           ("n" . other-window)
           ("h" . windmove-left)
           ("j" . windmove-down)
           ("k" . windmove-up)
           ("l" . windmove-right))
;; EWW
(bind-keys :map global-map
           :prefix-map my-eww-map
           :prefix "M-SPC e"
           ("w" . eww)
           ("R" . eww-reload)
           ("s" . eww-search-words))
;; Elisp Eval
(bind-keys :map global-map
           :prefix-map my-elisp-map
           :prefix "M-SPC e"
           ("b" . eval-buffer)
           ("d" . eval-defun)
           ("e" . eval-expression)
           ("l" . eval-last-sexp)
           ("r" . eval-region))
;; Dired
(bind-keys :map global-map
           :prefix-map my-dired-map
           :prefix "M-SPC d"
           ("d" . dired)
           ("j" . dired-jump)
           ("p" . peep-dired)
           ("v" . dired-view-file))
;; Common files
(bind-keys :map global-map
           :prefix-map my-common-files-map
           :prefix "M-SPC -"
           ("a" . (lambda () (interactive) (find-file "~/Nextcloud/org/agenda.org"))))
;; Applications
(bind-keys :map global-map
           :prefix-map my-applications-map
           :prefix "M-SPC o"
           ("m" . mu4e))
;; Org Mode
(bind-keys :map global-map
           :prefix-map my-org-mode-map
           :prefix "C-z"
           ("a" . org-agenda)
           ("c" . org-capture))
;; Misc
(bind-keys :map global-map
           :prefix-map my-misc-map
           :prefix "C-z"
           ("C-v" . current-volume))
#+END_SRC
** Shackle
What the hell are those default buffer popup locations?



@@ 1105,19 1042,13 @@ What the hell are those default buffer popup locations?

(shackle-mode)
#+END_SRC
** Avy
I'm a big fan of using avy. During quick sessions, I tend to make
mistakes and can jump to them easily with avy.

#+BEGIN_SRC emacs-lisp
(use-package avy)
#+END_SRC
** Selection
I've heard good about expand-region, so I've decided to give it a whirl.

#+BEGIN_SRC emacs-lisp
(use-package expand-region
  :bind ("C-=" . er/expand-region))
  :bind (("M-[" . er/expand-region)
         ("C-(" . er/mark-outside-pairs)))
#+END_SRC
** Yasnippet
Still trying to get use to this one, my ultisnips in Neovim are just


@@ 1169,15 1100,21 @@ to `describe-function` and the rest of those commands.
The one, the only. I used CLI git only (still do often) but now I've learned to love magit.

#+BEGIN_SRC emacs-lisp
(use-package magit
  :hook ((magit-mode . (lambda ()
                         (display-line-numbers-mode -1)
                         (setq-local global-hl-line-mode nil))))
  :bind ("C-x g" . magit-status))
      (use-package magit
        :commands (magit-status magit-get-current-branch)
        :custom
        (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
        :bind ("C-x g" . magit-status))

      (use-package magit-todos
        :defer t)

;; Hell yeah I want git gutter
(use-package git-gutter
  :hook ((prog-mode) . git-gutter-mode))
      ;; Hell yeah I want git gutter
      (use-package git-gutter
        :diminish
        :hook ((prog-mode) . git-gutter-mode)
        :config
        (setq git-gutter:update-interval 2))
#+END_SRC
** Vterm
Vterm is the best Emacs terminal, however I use Alacritty when


@@ 1752,7 1689,7 @@ native-comp should be phenomenal!)
(setq catster/use-mail t)

(when catster/use-mail
  (add-to-list 'load-path (concat user-emacs-directory "mu4e/"))
  (add-to-list 'load-path "~/.emacs.d/mu4e/")
  (require 'catsters-mail))
#+END_SRC
* Language Support


@@ 1765,35 1702,46 @@ Things that are really nice to have, but I'm not sure which category they would 
Smartparens is great, and helps me realise I didn't forget (that (one (parentheses)))

#+BEGIN_SRC emacs-lisp
(use-package smartparens
  :hook ((js-mode rjsx-mode web-mode css-mode html-mode rustic-mode c-mode python-mode) . smartparens-mode)
  :config
  (setq sp-highlight-pair-overlay nil)
  (setq sp-autoskip-closing-pair 'always)
  (setq sp-cancel-autoskip-on-backward-movement nil))
(show-paren-mode 1)
  (use-package smartparens
    :hook (prog-mode . smartparens-mode)
    :config
    (setq sp-highlight-pair-overlay nil)
    (setq sp-autoskip-closing-pair 'always)
    (setq sp-cancel-autoskip-on-backward-movement nil))
#+END_SRC

Makes code easier to read, and specifically on these, as I do not want rainbow to conflict with parinfer in Lisp
Compile various code and scroll output.

#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
  :hook ((hy-mode python-mode rustic-mode c-mode js-mode rjsx-mode web-mode css-mode html-mode) . rainbow-delimiters-mode))
(use-package compile
  :custom
  (compilation-scroll-output t))
#+END_SRC

Highlight indent guides, like the ones you see in IntelliJ or VSC.
Does this work in all modes? Yes.  Is this literally a saving grace in
Lisp modes? Yes.

#+BEGIN_SRC emacs-lisp
(use-package highlight-indent-guides
  :hook (prog-mode . highlight-indent-guides-mode)
  :custom
  (highlight-indent-guides-method 'column))
  (use-package parinfer-rust-mode
    :hook ((emacs-lisp-mode clojure-mode lisp-mode hy-mode racket-mode). parinfer-rust-mode)
    :init
    (setq parinfer-rust-auto-download t)
    (setq parinfer-rust-preferred-mode 'paren))
#+END_SRC

Makes code easier to read, and specifically on these, as I do not want rainbow to conflict with parinfer in Lisp

#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
  :hook ((hy-mode python-mode rustic-mode c-mode js-mode rjsx-mode web-mode css-mode html-mode) . rainbow-delimiters-mode))
#+END_SRC

See colors easily!

#+BEGIN_SRC emacs-lisp
(use-package rainbow-mode
  :hook ((hy-mode prog-mode) . rainbow-mode)
  :hook ((org-mode emacs-lisp-mode web-mode typescript-mode rjsx-mode) . rainbow-mode)
  :config
  (setq rainbow-x-colors nil))
#+END_SRC


@@ 1815,55 1763,71 @@ Who doesn't like Flycheck? :)

#+BEGIN_SRC emacs-lisp
(use-package flycheck
  :hook (prog-mode . flycheck-mode)
  :hook (lsp-mode . flycheck-mode)
  :config
  (setq-default flycheck-temp-prefix ".flycheck"))
#+END_SRC

** LSP
LSP is quite amazing, and has come /so/ far in Emacs!

#+BEGIN_SRC emacs-lisp
(use-package lsp-mode)
LSP is quite amazing, and has come /so/ far in Emacs! DAP is also
phenomenal, allowing for a proper debugging experience within Emacs
(although I tend to still use GDB/PDB CLI tools).

#+BEGIN_SRC emacs-lisp
(use-package lsp-mode
  :defer t
  :hook (((rustic-mode
           python-mode
           c-mode
           c++-mode
           rjsx-mode
           web-mode
           typescript-mode
           clojure-mode
           java-mode
           kotlin-mode
           scala-mode) . lsp)
         (lsp-mode . lsp-enable-which-key-integration))
  :commands (lsp)
  :config
  (setq  lsp-keymap-prefix "C-c l"
         lsp-eslint-run "onSave"
         lsp-log-io nil
         lsp-idle-delay 1
         lsp-headerline-breadcrumb-enable nil))

(use-package lsp-ui
  :hook (lsp-mode . lsp-ui-mode)
  :commands lsp-ui-mode
  :config
  (setq lsp-ui-sideline-show-hover nil
      lsp-ui-sideline-enable t
      lsp-ui-doc-enable nil
      lsp-signature-auto-activate nil
      lsp-signature-render-document nil
      ;; This is SO annoying. Believe it or not, I know what a `fn` does
      ;; in Rust!
      lsp-eldoc-render-all nil
      ;; Finally get my EXWM keybindings back!
      lsp-keymap-prefix "C-c l"
      lsp-eslint-run "onSave"
      lsp-idle-delay 1))
        lsp-ui-sideline-enable t
        lsp-ui-doc-enable nil
        lsp-signature-auto-activate nil
        lsp-signature-render-document nil
        ;; This is SO annoying. Believe it or not, I know what a `fn` does
        ;; in Rust!
        lsp-eldoc-render-all nil))

(use-package treemacs
  :no-require t)
#+END_SRC

** DAP
DAP is a great way to allow for more intuitive and fluid debugging in Emacs.

#+BEGIN_SRC emacs-lisp
(use-package dap-mode
  :after lsp-mode
  :custom
  (lsp-enable-dap-auto-configure nil)
  :config
  (dap-ui-mode 1)
  (dap-tooltip-mode 1))

;; Currently not working.
(require 'dap-lldb)
(require 'dap-gdb-lldb)
  ;; installs .extension/vscode
(dap-gdb-lldb-setup)
  (dap-tooltip-mode 1)
  (require 'dap-python)
  (require 'dap-lldb)
  (require 'dap-gdb-lldb)
  (dap-register-debug-template "Rust::GDB Run Configuration"
                               (list :type "gdb"
                                     :request "launch"
                                     :name "GDB::Run"
                                     :gdbpath "rust-gdb"
                                     :target nil
                                     :cwd nil))
  (require 'dap-node)
  (dap-node-setup))

(add-hook 'dap-stopped-hook
          (lambda (arg) (call-interactively #'dap-hydra)))


@@ 1882,6 1846,9 @@ working at understanding web languages, and although they use to
enfuriate me, I have a new-found appreciate and understanding for
them! They are here too of course now.

Languages are marked ~:disabled~ in ~use-package~ when I am not
currently doing a project in them (but would like to keep my setup).

*** Rust
Crustacean for life! Rust is a great language, but is taking it's time to
completely be accepted. Most of my work nowadays is done in Rust.


@@ 1892,8 1859,8 @@ completely be accepted. Most of my work nowadays is done in Rust.

(use-package rustic
  :bind (:map rustic-mode-map
              ("M-?" . lsp-find-references)
              ("C-c C-c l" . flycheck-list-errors)
              ("M-?" . lsp-find-references)
              ("C-c C-c a" . lsp-execute-code-action)
              ("C-c C-c r" . lsp-rename)
              ("C-c C-c q" . lsp-workspace-restart)


@@ 1901,17 1868,13 @@ completely be accepted. Most of my work nowadays is done in Rust.
              ("C-c C-c s" . lsp-rust-analyzer-status)
              ("C-c C-c d" . dap-hydra))
  :config
  (setq lsp-rust-analyzer-cargo-watch-command "clippy")
  (setq lsp-rust-analyzer-server-display-inlay-hints t)
  (setq rustic-format-on-save nil)
  (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))

(defun rk/rustic-mode-hook ()
  (setq-local buffer-save-without-query t))

(setq lsp-rust-analyzer-cargo-watch-command "clippy")
(setq lsp-rust-analyzer-server-display-inlay-hints t)

(add-hook 'rust-mode-hook #'lsp-deferred)
(add-hook 'rustic-mode-hook #'lsp-deferred)
#+END_SRC

Another interesting thing I recently found is Cargo mode, a minor mode


@@ 1987,8 1950,6 @@ development and getting ideas down.
  (setq
   pipenv-projectile-after-switch-function
   #'pipenv-projectile-after-switch-extended))

(add-hook 'python-mode-hook #'lsp-deferred)
#+END_SRC

**** Hy


@@ 2049,10 2010,6 @@ Just make sure to have clang installed!
(use-package google-c-style
  :hook ((c-mode c++-mode) . google-set-c-style)
  (c-mode-common . google-make-newline-indent))

(add-hook 'c-mode-hook #'lsp-deferred)
(add-hook 'c++-mode-hook #'lsp-deferred)
(add-hook 'awk-mode-hook #'lsp-deferred)
#+END_SRC

**** Arduino


@@ 2062,6 2019,15 @@ Arduinos is fun, but the Arduino IDE sucks. Let's use Emacs instead!
(use-package arduino-mode)
#+END_SRC

*** Clojure
I don't do JVM work often, but when I need to I prefer Clojure or
Kotlin (although I usually IntelliJ for Kotlin just because of the
perfect integration.)

#+BEGIN_SRC emacs-lisp
(use-package clojure-mode)
(use-package cider)
#+END_SRC
*** Web Languages
Despite my usual hate for these languages (and web languages in
general), I've recently been learning more about them and


@@ 2070,96 2036,34 @@ with them.) This is my configuration for JS, TS, React, and whatever
else I'll eventually need.

#+BEGIN_SRC emacs-lisp
(use-package web-mode)
(use-package rjsx-mode)
(use-package typescript-mode)
(use-package json-mode)

(use-package prettier-js
  :hook ((javascript-mode js-mode rjsx-mode html-mode css-mode yaml-mode) . prettier-js-mode))

(setq-default flycheck-disabled-checkers
              (append flycheck-disabled-checkers
                      '(javascript-jshint)))

(setq-default flycheck-disabled-checkers
              (append flycheck-disabled-checkers
                      '(json-jsonlist)))

(defun my/use-eslint-from-node-modules ()
  (let* ((root (locate-dominating-file
                (or (buffer-file-name) default-directory)
                "node_modules"))
         (eslint (and root
                      (expand-file-name "node_modules/eslint/bin/eslint.js"
                                        root))))
    (when (and eslint (file-executable-p eslint))
      (setq-local flycheck-javascript-eslint-executable eslint))))

(defun my-web-mode-hook ()
  "Hooks for Web mode. Adjust indents"
  (setq web-mode-markup-indent-offset 2)
  (setq web-mode-css-indent-offset 2)
  (setq web-mode-code-indent-offset 2)
  (setq web-mode-enable-auto-quoting nil)
  (setq web-mode-attr-indent-offset 2)
  (setq web-mode-attr-value-indent-offset 2))

(flycheck-add-mode 'typescript-tslint 'web-mode)

(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
(add-hook 'rjsx-mode-hook #'(lambda () (electric-indent-local-mode -1)))
(add-hook 'rjsx-mode-hook #'lsp-deferred)
(add-hook 'css-mode-hook #'lsp-deferred)
(add-hook 'html-mode-hook #'lsp-deferred)
(add-hook 'web-mode-hook  'my-web-mode-hook)
(add-hook 'web-mode-hook #'lsp-deferred)

(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js.*$" . rjsx-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . json-mode))
#+END_SRC
*** Lisp
There are so many dialects and specifications. I work mostly in Emacs
Lisp (hm, wonder why,) Racket (as my main Scheme,) Common Lisp (for my
"real lisp" projects,) Hy (because I dislike Python syntax,) and
Clojure. Hy is placed under Python appropriately.

Does this work in all modes? Yes.  Is this literally a saving grace in
Lisp modes? Yes.
  (use-package web-mode
    :mode "\\.tsx\\'"
    :custom
    (web-mode-markup-indent-offset 2)
    (web-mode-css-indent-offset 2)
    (web-mode-code-indent-offset 2)
    (web-mode-enable-auto-quoting nil)
    (web-mode-attr-indent-offset 2)
    (web-mode-attr-value-indent-offset 2))

#+BEGIN_SRC emacs-lisp
(show-paren-mode 1)
  (use-package rjsx-mode
    :mode "\\.js.*$")

(use-package parinfer-rust-mode
  :hook ((emacs-lisp-mode clojure-mode lisp-mode hy-mode racket-mode). parinfer-rust-mode)
  :config
  (setq parinfer-rust-auto-download t))
#+END_SRC
  (use-package typescript-mode)

**** Clojure
I don't do JVM work often, but when I need to I prefer Clojure or
Kotlin (although I usually IntelliJ for Kotlin just because of the
perfect integration.)
  (use-package json-mode
    :mode "\\.json$")

#+BEGIN_SRC emacs-lisp
(use-package clojure-mode)
(use-package cider)

(add-hook 'clojure-mode-hook #'lsp-deferred)
#+END_SRC
  (use-package prettier-js
    :config
    (setq prettier-js-show-errors nil))

**** Common Lisp
SLY is my favorite, as I never used the presentions feature of
SLIME. Stickers are awesome!
  (flycheck-add-mode 'typescript-tslint 'web-mode)

#+BEGIN_SRC emacs-lisp
(use-package sly
  :config
  (setq inferior-lisp-program "sbcl"))
  (add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
  (add-hook 'rjsx-mode-hook #'(lambda () (electric-indent-local-mode -1)))
#+END_SRC

**** MIT/GNU Scheme
*** MIT/GNU Scheme
I don't see any projects these days done in MIT/GNU Scheme, but to
work through SICP and Software Design for Flexibility in it is great!



@@ 2174,16 2078,54 @@ work through SICP and Software Design for Flexibility in it is great!
  :after geiser-repl
  :config (add-hook 'geiser-repl-mode-hook #'macrostep-geiser-setup))
#+END_SRC
**** Racket
Racket is an interesting pseudo Scheme, and it's not my first choice,
but I do like it!
*** JVM
I rarely use the JVM languages (except Clojure) but still do enjoy
them (even Java!) every once in a while. Why not set them up as well?

All of JVM is disabled (no projects currently in these languages).

**** Java
Ole' grandpa himself.

#+BEGIN_SRC emacs-lisp
(use-package racket-mode
  :config
  (add-hook 'racket-mode-hook
            (lambda ()
              (define-key racket-mode-map (kbd "<f5>") 'racket-run))))
  (use-package lsp-java
    :disabled)
#+END_SRC

**** Kotlin
The cool kid.

#+BEGIN_SRC emacs-lisp
  (use-package kotlin-mode
    :disabled)

  (use-package flycheck-kotlin
    :disabled)
#+END_SRC

**** Scala
The nerd.

#+BEGIN_SRC emacs-lisp
  (use-package scala-mode
    :mode "\\.s\\(cala\\|bt\\)$"
    :disabled)

  (use-package sbt-mode
    :commands sbt-start sbt-command
    :disabled
    :custom
    (sbt:default-command "testQuick")
    :config
    ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31
    ;; allows using SPACE when in the minibuffer
    (substitute-key-definition
     'minibuffer-complete-word
     'self-insert-command
     minibuffer-local-completion-map))

  (use-package lsp-metals
    :disabled)
#+END_SRC

* Org Mode


@@ 2193,47 2135,51 @@ Even more features to org-mode!
These are defaults that I have found make Org mode more enjoyable to use.

#+BEGIN_SRC emacs-lisp
;; Much better defaults for Orgmode, these will be modified shortly
(defun +org|setup-ui ()
  "Configures the UI for `org-mode'."
  (setq-default org-adapt-indentation nil
                org-cycle-include-plain-lists t
                org-eldoc-breadcrumb-separator " → "
                org-entities-user '(("flat" "\\flat" nil "" "" "266D" "♭") ("sharp" "\\sharp" nil "" "" "266F" "♯"))
                org-fontify-done-headline t
                org-fontify-quote-and-verse-blocks t
                org-fontify-whole-heading-line t
                org-footnote-auto-label 'plain
                org-hidden-keywords nil
                org-hide-emphasis-markers nil
                org-hide-leading-stars t
                org-hide-leading-stars-before-indent-mode t
                org-image-actual-width nil
                org-indent-indentation-per-level 2
                org-indent-mode-turns-on-hiding-stars t
                org-list-description-max-indent 4
                org-pretty-entities nil
                org-pretty-entities-include-sub-superscripts t
                org-priority-faces '((?a . error) (?b . warning) (?c . success))
                org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
                org-startup-folded t
                org-startup-indented t
                org-startup-with-inline-images nil
                org-tags-column 0
                org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)") (sequence "[ ](T)" "[-](p)" "[?](m)" "|" "[X](D)") (sequence "NEXT(n)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)"))
                org-todo-keyword-faces '(("[-]" :inherit (font-lock-constant-face bold)) ("[?]" :inherit (warning bold)) ("WAITING" :inherit bold) ("LATER" :inherit (warning bold)))
                org-use-sub-superscripts '{}))

(add-hook 'org-mode-hook #'+org|setup-ui)

(setq org-src-preserve-indentation nil
      org-edit-src-content-indentation 0)

(font-lock-add-keywords 'org-mode
  ;; Much better defaults for Orgmode, these will be modified shortly
  (defun +org|setup-ui ()
    "Configures the UI for `org-mode'."
    (org-indent-mode)
    (auto-fill-mode 0)
    (visual-line-mode 1)
    (diminish org-indent-mode)
    (setq-default org-adapt-indentation nil
                  org-cycle-include-plain-lists t
                  org-eldoc-breadcrumb-separator " → "
                  org-entities-user '(("flat" "\\flat" nil "" "" "266D" "♭") ("sharp" "\\sharp" nil "" "" "266F" "♯"))
                  org-fontify-done-headline t
                  org-fontify-quote-and-verse-blocks t
                  org-fontify-whole-heading-line t
                  org-footnote-auto-label 'plain
                  org-hidden-keywords nil
                  org-hide-emphasis-markers t
                  org-hide-leading-stars t
                  org-hide-leading-stars-before-indent-mode t
                  org-image-actual-width nil
                  org-indent-indentation-per-level 2
                  org-indent-mode-turns-on-hiding-stars t
                  org-list-description-max-indent 4
                  org-pretty-entities nil
                  org-pretty-entities-include-sub-superscripts t
                  org-priority-faces '((?a . error) (?b . warning) (?c . success))
                  org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
                  org-startup-folded t
                  org-startup-indented t
                  org-startup-with-inline-images nil
                  org-tags-column 0
                  org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)") (sequence "[ ](T)" "[-](p)" "[?](m)" "|" "[X](D)") (sequence "NEXT(n)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)"))
                  org-todo-keyword-faces '(("[-]" :inherit (font-lock-constant-face bold)) ("[?]" :inherit (warning bold)) ("WAITING" :inherit bold) ("LATER" :inherit (warning bold)))
                  org-use-sub-superscripts '{}))

  (add-hook 'org-mode-hook #'+org|setup-ui)

  (setq org-src-preserve-indentation nil
        org-edit-src-content-indentation 0)

  (font-lock-add-keywords 'org-mode
                          '(("^ *\\([-]\\) "
                             (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))

(custom-theme-set-faces
  (custom-theme-set-faces
   'user
   '(org-block ((t (:inherit fixed-pitch))))
   '(org-code ((t (:inherit (shadow fixed-pitch)))))


@@ 2248,74 2194,74 @@ These are defaults that I have found make Org mode more enjoyable to use.
   '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
   '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

(defun ck/org-confirm-babel-evaluate (lang body)
  (not (or (string= lang "latex") (string= lang "emacs-lisp"))))
(setq org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate)

;; Change colours for headings
(custom-set-faces
 '(default     ((t (:foreground "#BBC2CF"))))
 '(org-level-1 ((t (:foreground "#BF9D7A"))))
 '(org-level-2 ((t (:foreground "#E4E9CD"))))
 '(org-level-3 ((t (:foreground "#EBF2EA"))))
 '(org-level-4 ((t (:foreground "#0ABDA0"))))
 '(org-level-5 ((t (:foreground "#80ADD7")))))

;; Use ~tectonic~ instead of pdflatex in org
(setq org-latex-pdf-process
      '("tectonic %f"))

;; I really like the look of UTF-8 bullets, however, they were causing major slowdown in Org mode!
;; But I'm willing to try it again!
(use-package org-bullets
  :config
  (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))

;; Hide emphasis markings
(use-package org-appear
  :straight '(org-appear :type git :host github :repo "awth13/org-appear")
  :hook (org-mode . org-appear-mode))

;; Better options
(setq org-directory "~/Nextcloud/org/" ; This way, all org mode files are synced across devices
      org-agenda-files '("~/Nextcloud/org/")
      org-default-notes-file (expand-file-name "notes.org" org-directory)
      org-ellipsis " ▼ "
      org-capture-templates
      '(("t" "todo" entry (file+headline "~/Nextcloud/org/todo.org" "Tasks")
         "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
        ("j" "Journal Entry" entry (file+olp+datetree "~/Nextcloud/org/journal.org.gpg")
         "* %? %i %a Added: %U")
        ("K" "Cliplink capture task" entry (file "")
         "* TODO %(org-cliplink-capture) \n  SCHEDULED: %t\n" :empty-lines 1))
      org-log-done 'time
      org-journal-date-format "%B %d, %Y (%A) "
      org-hide-emphasis-markers t
      ;; ex. of org-link-abbrev-alist in action
      ;; [[arch-wiki:Name_of_Page][Description]]
      org-link-abbrev-alist    ; This overwrites the default Doom org-link-abbrev-list
      '(("google" . "http://www.google.com/search?q=")
        ("arch-wiki" . "https://wiki.archlinux.org/index.php/")
        ("ddg" . "https://duckduckgo.com/?q=")
        ("wiki" . "https://en.wikipedia.org/wiki/"))
      org-todo-keywords        ; This overwrites the default Doom org-todo-keywords
      '((sequence
         "TODO(t)"           ; A task that is ready to be tackled
         "BLOG(b)"           ; Blog writing assignments
         "GYM(g)"            ; Things to accomplish at the gym
         "PROJ(p)"           ; A project that contains other tasks
         "VIDEO(v)"          ; Video assignments
         "WAIT(w)"           ; Something is holding up this task
         "|"                 ; The pipe necessary to separate "active" states and "inactive" states
         "DONE(d)"           ; Task has been completed
         "CANCELLED(c)"))) ; Task has been cancelled

;; FUCK YEAH Radians over Degrees.
(setq calc-angle-mode 'rad  ; radians are rad, fuck degrees
      calc-symbolic-mode t) ; keeps expressions like \sqrt{2} irrational for as long as possible

;; Indent properly in Org mode
(org-indent-mode 1)
  (defun ck/org-confirm-babel-evaluate (lang body)
    (not (or (string= lang "latex") (string= lang "emacs-lisp"))))
  (setq org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate)

  ;; Change colours for headings
  (custom-set-faces
   '(default     ((t (:foreground "#BBC2CF"))))
   '(org-level-1 ((t (:foreground "#BF9D7A"))))
   '(org-level-2 ((t (:foreground "#E4E9CD"))))
   '(org-level-3 ((t (:foreground "#EBF2EA"))))
   '(org-level-4 ((t (:foreground "#0ABDA0"))))
   '(org-level-5 ((t (:foreground "#80ADD7")))))

  ;; Use ~tectonic~ instead of pdflatex in org
  (setq org-latex-pdf-process
        '("tectonic %f"))

  ;; I really like the look of UTF-8 bullets, however, they were causing major slowdown in Org mode!
  ;; But I'm willing to try it again!
  (use-package org-bullets
    :config
    (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))

  ;; Hide emphasis markings
  (use-package org-appear
    :straight '(org-appear :type git :host github :repo "awth13/org-appear")
    :hook (org-mode . org-appear-mode))

  ;; Better options
  (setq org-directory "~/Nextcloud/org/" ; This way, all org mode files are synced across devices
        org-agenda-files '("~/Nextcloud/org/")
        org-default-notes-file (expand-file-name "notes.org" org-directory)
        org-ellipsis " ▼ "
        org-capture-templates
        '(("t" "todo" entry (file+headline "~/Nextcloud/org/todo.org" "Tasks")
           "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
          ("j" "Journal Entry" entry (file+olp+datetree "~/Nextcloud/org/journal.org.gpg")
           "* %? %i %a Added: %U")
          ("K" "Cliplink capture task" entry (file "")
           "* TODO %(org-cliplink-capture) \n  SCHEDULED: %t\n" :empty-lines 1))
        org-log-done 'time
        org-journal-date-format "%B %d, %Y (%A) "
        org-hide-emphasis-markers t
        ;; ex. of org-link-abbrev-alist in action
        ;; [[arch-wiki:Name_of_Page][Description]]
        org-link-abbrev-alist    ; This overwrites the default Doom org-link-abbrev-list
        '(("google" . "http://www.google.com/search?q=")
          ("arch-wiki" . "https://wiki.archlinux.org/index.php/")
          ("ddg" . "https://duckduckgo.com/?q=")
          ("wiki" . "https://en.wikipedia.org/wiki/"))
        org-todo-keywords        ; This overwrites the default Doom org-todo-keywords
        '((sequence
           "TODO(t)"           ; A task that is ready to be tackled
           "BLOG(b)"           ; Blog writing assignments
           "GYM(g)"            ; Things to accomplish at the gym
           "PROJ(p)"           ; A project that contains other tasks
           "VIDEO(v)"          ; Video assignments
           "WAIT(w)"           ; Something is holding up this task
           "|"                 ; The pipe necessary to separate "active" states and "inactive" states
           "DONE(d)"           ; Task has been completed
           "CANCELLED(c)"))) ; Task has been cancelled

  ;; FUCK YEAH Radians over Degrees.
  (setq calc-angle-mode 'rad  ; radians are rad, fuck degrees
        calc-symbolic-mode t) ; keeps expressions like \sqrt{2} irrational for as long as possible

  ;; Indent properly in Org mode
  (org-indent-mode 1)
#+END_SRC

** Blog, Agenda, and Capture


@@ 2437,41 2383,60 @@ article text and put it into an Org file.
  (org-web-tools-pandoc-sleep-time 0.5))
#+END_SRC

** Async Babel Tangle
These functions were made by DT (a GNU/Linux and Emacs YouTuber) and
are quite useful for literate programming, and this config!

#+BEGIN_SRC emacs-lisp
(defun dt/org-babel-tangle-async (file)
  "Invoke `org-babel-tangle-file' asynchronously."
  (message "Tangling %s..." (buffer-file-name))
  (async-start
   (let ((args (list file)))
     `(lambda ()
        (require 'org)
        ;;(load "~/.emacs.d/init.el")
        (let ((start-time (current-time)))
          (apply #'org-babel-tangle-file ',args)
          (format "%.2f" (float-time (time-since start-time))))))
   (let ((message-string (format "Tangling %S completed after " file)))
     `(lambda (tangle-time)
        (message (concat ,message-string
                         (format "%s seconds" tangle-time)))))))

(defun dt/org-babel-tangle-current-buffer-async ()
  "Tangle current buffer asynchronously."
  (dt/org-babel-tangle-async (buffer-file-name)))
#+END_SRC
** Org Present
   Now that school is starting up again, and I'm trying to do a few
   talks at various conferences, I've added ~org-present~. Currently
   borrowing the config from daviwil until I'm ready to make my own
   changes.

   #+BEGIN_SRC emacs-lisp
     (defun dw/org-present-prepare-slide ()
       (org-overview)
       (org-show-entry)
       (org-show-children))

     (defun dw/org-present-hook ()
       (setq-local face-remapping-alist '((default (:height 1.5) variable-pitch)
                                          (header-line (:height 4.5) variable-pitch)
                                          (org-code (:height 1.55) org-code)
                                          (org-verbatim (:height 1.55) org-verbatim)
                                          (org-block (:height 1.25) org-block)
                                          (org-block-begin-line (:height 0.7) org-block)))
       (setq header-line-format " ")
       (org-display-inline-images)
       (dw/org-present-prepare-slide))

     (defun dw/org-present-quit-hook ()
       (setq-local face-remapping-alist '((default variable-pitch default)))
       (setq header-line-format nil)
       (org-present-small)
       (org-remove-inline-images))

     (defun dw/org-present-prev ()
       (interactive)
       (org-present-prev)
       (dw/org-present-prepare-slide))

     (defun dw/org-present-next ()
       (interactive)
       (org-present-next)
       (dw/org-present-prepare-slide))

     (use-package org-present
       :bind (:map org-present-mode-keymap
                   ("C-c C-j" . dw/org-present-next)
                   ("C-c C-k" . dw/org-present-prev))
       :hook ((org-present-mode . dw/org-present-hook)
              (org-present-mode-quit . dw/org-present-quit-hook)))
   #+END_SRC

** Other Settings
Things I've come across and went "that would be amazing for Org!" but
wasn't sure what section to put this in.

#+BEGIN_SRC emacs-lisp
(use-package toc-org
  :config
  (add-hook 'org-mode-hook 'toc-org-mode)
  (add-hook 'markdown-mode-hook 'toc-org-mode))
(use-package org-make-toc
  :hook (org-mode . org-make-toc-mode))

;; NO spell check for embedded snippets
(defadvice org-mode-flyspell-verify (after org-mode-flyspell-verify-hack activate)

M exwm.org => exwm.org +20 -18
@@ 755,27 755,29 @@ My EXWM config truly makes Emacs feel like a worthy desktop
environment.

#+BEGIN_SRC emacs-lisp
(require 'ido)
(use-package windower)
(use-package dmenu)
  (require 'ido)
  (use-package windower)
  (use-package app-launcher
  :straight '(app-launcher :host github :repo "SebastienWae/app-launcher"))

(require 'browse-url)
(require 'exwm-manage)

(defun catster/run-in-background (command)
  "Run command asynchronously in the background."
  (let ((command-parts (split-string command "[ ]+")))
    (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
  (require 'browse-url)
  (require 'exwm-manage)

(defun catster/run-external-program (program)
  "Run given external program"
  (interactive)
  (start-process-shell-command "" nil program))
  (defun catster/run-in-background (command)
    "Run command asynchronously in the background."
    (let ((command-parts (split-string command "[ ]+")))
      (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))

(defun catster/reboot-linux-computer (program)
  "Run given external program"
  (interactive)
  (start-process-shell-command "" nil "sudo reboot"))
  (defun catster/run-external-program (program)
    "Run given external program"
    (interactive)
    (start-process-shell-command "" nil program))

  (defun catster/reboot-linux-computer (program)
    "Run given external program"
    (interactive)
    (start-process-shell-command "" nil "sudo reboot"))
#+END_SRC

Some programs really benefit from being in "char mode," almost all


@@ 854,7 856,7 @@ Below is my main configuration for EXWM, with 10 workspaces (0-9).
            ;; (,(kbd "s-g") . )
            ;; (,(kbd "s-g") . )
            (,(kbd "s-g") . grep) ;; Grep search in files
            (,(kbd "s-d") . dmenu) ;; Start an application using dmenu
            (,(kbd "s-d") . app-launcher) ;; Start an application using dmenu
            ;; (,(kbd "s-W") . )
            (,(kbd "s-m") . (lambda () ;; Toggle display of mode-line and minibuffer, in an EXWM window
                              (interactive)

M init.el => init.el +266 -269
@@ 2,25 2,9 @@
(defconst IS-MAC     (eq system-type 'darwin))
(defconst IS-LINUX   (eq system-type 'gnu/linux))

(defconst engineered-version "1.1.0"
(defconst engineered-version "2.4.0"
  "Current version of Engineered Emacs.")

(defconst engineered-emacs-dir user-emacs-directory
  "The path to the currently loaded .emacs.d directory. Must end with a slash.")

(defconst engineered-local-dir
  (let ((localdir (getenv-internal "EELOCALDIR")))
    (if localdir
	      (expand-file-name (file-name-as-directory localdir))
      (concat engineered-emacs-dir ".local/")))
  "Root directory for local storage.")

(defconst engineered-etc-dir (concat engineered-local-dir "etc/")
  "Directory for non-volatile local storage. For not often changing files.")

(defconst engineered-cache-dir (concat engineered-local-dir "cache/")
  "Directory for volatile local storage.")

;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are
;; compiled ahead-of-time when they are installed and site files are compiled
;; when gccemacs is installed.


@@ 47,18 31,6 @@
      inhibit-default-init t
      byte-compile-warnings '(not cl-functions))

;;; Yeah, the littering of my dir is a bit annoying
(setq async-byte-compile-log-file  (concat engineered-etc-dir "async-bytecomp.log")
      desktop-dirname              (concat engineered-etc-dir "desktop")
      desktop-base-file-name       "autosave"
      desktop-base-lock-name       "autosave-lock"
      pcache-directory             (concat engineered-cache-dir "pcache/")
      request-storage-directory    (concat engineered-cache-dir "request")
      shared-game-score-directory  (concat engineered-etc-dir "shared-game-score/"))

;; Effectively "disable" customize, since programmtic is better for repeatability
(setq custom-file (make-temp-file "emacs-custom"))

;;; Optimizations!
;; Don't rely on case insensitivity.
(setq auto-mode-case-fold nil)


@@ 95,9 67,6 @@
;; Slow the UI updates
(setq idle-update-delay 1.0)

;; Slows the LSP hints
(setq lsp-idle-delay 0.500)

;; Increase memory usage, but increase performance. No thank you, font compacting!
(setq inhibit-compacting-font-caches t)



@@ 140,7 109,7 @@
      tls-program '("gnutls-cli -p %p %h"))

;; Emacs stores `authinfo' in $HOME and in plain-text. WHY!?
(setq auth-sources (list (concat engineered-etc-dir "authinfo.gpg")
(setq auth-sources (list (concat user-emacs-directory "authinfo.gpg")
                         "~/.authinfo"
			                   "~/.authinfo.gpg"))



@@ 152,6 121,7 @@
;; UTF-8!
(when (fboundp 'set-charset-priority)
  (set-charset-priority 'unicode))
(set-default-coding-systems 'utf-8)
(prefer-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
;; Of course Windows does it's own thing.


@@ 225,13 195,30 @@

(setq set-mark-command-repeat-pop t)

(setq global-auto-revert-non-file-buffers t)
(global-auto-revert-mode 1)

(global-display-line-numbers-mode 1)
(dolist (mode '(text-mode-hook
                  prog-mode-hook
                  conf-mode-hook))
    (add-hook mode (lambda () (display-line-numbers-mode 1))))

  (dolist (mode '(org-mode-hook))
    (add-hook mode (lambda ()
                     (display-line-numbers-mode 0)
                     (setq-local global-hl-line-mode nil))))
(dolist (mode '(vterm-mode-hook))
  (add-hook mode (lambda ()
                   (display-line-numbers-mode 0)
                   (setq-local global-hl-line-mode nil))))
  (dolist (mode '(magit-mode-hook))
    (add-hook mode (lambda ()
                     (display-line-numbers-mode 0)
                     (setq-local global-hl-line-mode nil))))

(add-to-list 'load-path (concat user-emacs-directory "lisp/"))
(add-to-list 'load-path "~/.emacs.d/lisp/")

(global-visual-line-mode 1)
(setq scroll-step 1)

(defalias 'yes-or-no-p 'y-or-n-p)



@@ 246,7 233,30 @@

(add-to-list 'default-frame-alist '(font . "JetBrainsMono Nerd Font 11"))
(use-package emojify
  :hook (after-init . global-emojify-mode))
  :hook (erc-mode . emojify-mode)
  :commands emojify-mode)

(use-package diminish)

(use-package default-text-scale
  :defer 1
  :config
  (default-text-scale-mode))

(use-package super-save
  :defer 1
  :diminish super-save-mode
  :config
  (super-save-mode +1)
  (setq super-save-auto-save-when-idle t))

(setq display-buffer-base-action
      '(display-buffer-reuse-mode-window
        display-buffer-reuse-window
        display-buffer-same-window))

;; If a popup does happen, don't resize windows to be equal-sized
(setq even-window-sizes nil)

(use-package all-the-icons-dired)
(use-package peep-dired)


@@ 283,16 293,21 @@
(use-package all-the-icons)

(use-package doom-modeline
  :hook (after-init . doom-modeline-mode)
  :hook (after-init . doom-modeline-init)
  :custom-face
  (mode-line ((t (:height 0.85))))
  (mode-line-inactive ((t (:height 0.85))))
  :custom
  (doom-modeline-icon t)
  (doom-modeline-major-mode-icon t)
  (doom-modeline-major-mode-color-icon t)
  (doom-modeline-buffer-state-icon t)
  (doom-modeline-height 15)
  (doom-modeline-bar-width 6)
  (doom-modeline-lsp t)
  (doom-modeline-github nil)
  (doom-modeline-mu4e t)
  (doom-modeline-irc t)
  (doom-modeline-minor-modes t)
  (doom-modeline-buffer-modification-icon t)
  (doom-modeline-bar-width 3)
  (doom-modeline-height 15))
  (doom-modeline-persp-name nil)
  (doom-modeline-buffer-file-name-style 'truncate-except-project)
  (doom-modeline-major-mode-icon t))

;; Don't bring up key recipient dialogue.
(require 'epa-file)


@@ 601,24 616,31 @@
  (consult-customize affe-grep :preview-key (kbd "M-.")))

(use-package which-key
  :init
  (which-key-mode 1)
  :diminish which-key-mode
  :config
  (setq which-key-idle-delay 0.3)
  (setq which-key-separator " ")
  (setq which-key-prefix-prefix "+")
  (which-key-mode 1))
  (setq which-key-prefix-prefix "+"))

(use-package projectile
  :diminish projectile-mode
  :config
  (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
  (setq projectile-require-project-root nil)
  (setq projectile-mode-line "")
  (projectile-mode 1))
  (projectile-mode)
  :demand t
  :bind-keymap ("C-c p" . projectile-command-map)
  :init
  (when (file-directory-p "~/Projects/Programming")
    (setq projectile-project-search-path '("~/Projects/Programming"))))

(use-package crux
  :config
  ;; ispell words then abbrev
  (setq save-abbrevs 'silently)
  (setq-default abbrev-mode t)

  ;; Replace default commands with CRUX
  (global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line)
  (global-set-key (kbd "C-c o") #'crux-open-with)


@@ 626,6 648,15 @@
  (global-set-key (kbd "C-<backspace>") #'crux-kill-line-backwards)
  (global-set-key [remap kill-whole-line] #'crux-kill-whole-line))

(use-package ace-window
  :bind (("M-o" . ace-window))
  :custom
  (aw-scope 'frame)
  (aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
  (aw-minibuffer-flag t)
  :config
  (ace-window-display-mode 1))

(use-package no-littering
  :config
  (require 'recentf)


@@ 635,69 666,6 @@
        `((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))
  (setq custom-file (expand-file-name "custom.el" user-emacs-directory)))

;; Convenient for things I do not do too often, but are convenient
(global-unset-key (kbd "M-SPC"))
;; A waste of a keybinding when using EXWM
(global-unset-key (kbd "C-z"))

;; Window actions
(bind-keys :map global-map
           :prefix-map my-window-map
           :prefix "M-SPC w"
           ("-" . split-window-below)
           ("|" . split-window-right)
           ("d" . delete-window)
           ("n" . other-window)
           ("h" . windmove-left)
           ("j" . windmove-down)
           ("k" . windmove-up)
           ("l" . windmove-right))
;; EWW
(bind-keys :map global-map
           :prefix-map my-eww-map
           :prefix "M-SPC e"
           ("w" . eww)
           ("R" . eww-reload)
           ("s" . eww-search-words))
;; Elisp Eval
(bind-keys :map global-map
           :prefix-map my-elisp-map
           :prefix "M-SPC e"
           ("b" . eval-buffer)
           ("d" . eval-defun)
           ("e" . eval-expression)
           ("l" . eval-last-sexp)
           ("r" . eval-region))
;; Dired
(bind-keys :map global-map
           :prefix-map my-dired-map
           :prefix "M-SPC d"
           ("d" . dired)
           ("j" . dired-jump)
           ("p" . peep-dired)
           ("v" . dired-view-file))
;; Common files
(bind-keys :map global-map
           :prefix-map my-common-files-map
           :prefix "M-SPC -"
           ("a" . (lambda () (interactive) (find-file "~/Nextcloud/org/agenda.org"))))
;; Applications
(bind-keys :map global-map
           :prefix-map my-applications-map
           :prefix "M-SPC o"
           ("m" . mu4e))
;; Org Mode
(bind-keys :map global-map
           :prefix-map my-org-mode-map
           :prefix "C-z"
           ("a" . org-agenda)
           ("c" . org-capture))
;; Misc
(bind-keys :map global-map
           :prefix-map my-misc-map
           :prefix "C-z"
           ("C-v" . current-volume))

(defun rk/open-compilation-buffer (&optional buffer-or-name shackle-alist shackle-plist)
  "Helper for selecting window for opening *compilation* buffers."
  ;; find existing compilation window left of the current window or left-most window


@@ 749,10 717,9 @@

(shackle-mode)

(use-package avy)

(use-package expand-region
  :bind ("C-=" . er/expand-region))
  :bind (("M-[" . er/expand-region)
         ("C-(" . er/mark-outside-pairs)))

(use-package yasnippet
  :config


@@ 790,14 757,20 @@
  (global-set-key (kbd "C-h C") #'helpful-command))

(use-package magit
  :hook ((magit-mode . (lambda ()
                         (display-line-numbers-mode -1)
                         (setq-local global-hl-line-mode nil))))
  :commands (magit-status magit-get-current-branch)
  :custom
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
  :bind ("C-x g" . magit-status))

(use-package magit-todos
  :defer t)

;; Hell yeah I want git gutter
(use-package git-gutter
  :hook ((prog-mode) . git-gutter-mode))
  :diminish
  :hook ((prog-mode) . git-gutter-mode)
  :config
  (setq git-gutter:update-interval 2))

(use-package vterm
   :commands vterm


@@ 1216,26 1189,32 @@
(setq catster/use-mail t)

(when catster/use-mail
  (add-to-list 'load-path (concat user-emacs-directory "mu4e/"))
  (add-to-list 'load-path "~/.emacs.d/mu4e/")
  (require 'catsters-mail))

(use-package smartparens
  :hook ((js-mode rjsx-mode web-mode css-mode html-mode rustic-mode c-mode python-mode) . smartparens-mode)
  :config
  (setq sp-highlight-pair-overlay nil)
  (setq sp-autoskip-closing-pair 'always)
  (setq sp-cancel-autoskip-on-backward-movement nil))
(show-paren-mode 1)
  (use-package smartparens
    :hook (prog-mode . smartparens-mode)
    :config
    (setq sp-highlight-pair-overlay nil)
    (setq sp-autoskip-closing-pair 'always)
    (setq sp-cancel-autoskip-on-backward-movement nil))

(use-package compile
  :custom
  (compilation-scroll-output t))

(use-package parinfer-rust-mode
  :hook ((emacs-lisp-mode clojure-mode lisp-mode hy-mode racket-mode). parinfer-rust-mode)
  :init
  (setq parinfer-rust-auto-download t)
  (setq parinfer-rust-preferred-mode 'paren))

(use-package rainbow-delimiters
  :hook ((hy-mode python-mode rustic-mode c-mode js-mode rjsx-mode web-mode css-mode html-mode) . rainbow-delimiters-mode))

(use-package highlight-indent-guides
  :hook (prog-mode . highlight-indent-guides-mode)
  :custom
  (highlight-indent-guides-method 'column))

(use-package rainbow-mode
  :hook ((hy-mode prog-mode) . rainbow-mode)
  :hook ((org-mode emacs-lisp-mode web-mode typescript-mode rjsx-mode) . rainbow-mode)
  :config
  (setq rainbow-x-colors nil))



@@ 1244,31 1223,44 @@
(use-package deadgrep)

(use-package flycheck
  :hook (prog-mode . flycheck-mode)
  :hook (lsp-mode . flycheck-mode)
  :config
  (setq-default flycheck-temp-prefix ".flycheck"))

(use-package lsp-mode)
(use-package lsp-mode
  :defer t
  :hook (((rustic-mode
           python-mode
           c-mode
           c++-mode
           rjsx-mode
           web-mode
           typescript-mode
           clojure-mode
           java-mode
           kotlin-mode
           scala-mode) . lsp)
         (lsp-mode . lsp-enable-which-key-integration))
  :commands (lsp)
  :config
  (setq  lsp-keymap-prefix "C-c l"
         lsp-eslint-run "onSave"
         lsp-log-io nil
         lsp-idle-delay 1
         lsp-headerline-breadcrumb-enable nil))

(use-package lsp-ui
  :hook (lsp-mode . lsp-ui-mode)
  :commands lsp-ui-mode
  :config
  (setq lsp-ui-sideline-show-hover nil
      lsp-ui-sideline-enable t
      lsp-ui-doc-enable nil
      lsp-signature-auto-activate nil
      lsp-signature-render-document nil
      ;; This is SO annoying. Believe it or not, I know what a `fn` does
      ;; in Rust!
      lsp-eldoc-render-all nil
      ;; Finally get my EXWM keybindings back!
      lsp-keymap-prefix "C-c l"
      lsp-eslint-run "onSave"
      lsp-idle-delay 1))

(use-package treemacs
  :no-require t)
        lsp-ui-sideline-enable t
        lsp-ui-doc-enable nil
        lsp-signature-auto-activate nil
        lsp-signature-render-document nil
        ;; This is SO annoying. Believe it or not, I know what a `fn` does
        ;; in Rust!
        lsp-eldoc-render-all nil))

(use-package dap-mode
  :after lsp-mode


@@ 1276,13 1268,19 @@
  (lsp-enable-dap-auto-configure nil)
  :config
  (dap-ui-mode 1)
  (dap-tooltip-mode 1))

;; Currently not working.
(require 'dap-lldb)
(require 'dap-gdb-lldb)
  ;; installs .extension/vscode
(dap-gdb-lldb-setup)
  (dap-tooltip-mode 1)
  (require 'dap-python)
  (require 'dap-lldb)
  (require 'dap-gdb-lldb)
  (dap-register-debug-template "Rust::GDB Run Configuration"
                               (list :type "gdb"
                                     :request "launch"
                                     :name "GDB::Run"
                                     :gdbpath "rust-gdb"
                                     :target nil
                                     :cwd nil))
  (require 'dap-node)
  (dap-node-setup))

(add-hook 'dap-stopped-hook
          (lambda (arg) (call-interactively #'dap-hydra)))


@@ 1292,8 1290,8 @@

(use-package rustic
  :bind (:map rustic-mode-map
              ("M-?" . lsp-find-references)
              ("C-c C-c l" . flycheck-list-errors)
              ("M-?" . lsp-find-references)
              ("C-c C-c a" . lsp-execute-code-action)
              ("C-c C-c r" . lsp-rename)
              ("C-c C-c q" . lsp-workspace-restart)


@@ 1301,18 1299,14 @@
              ("C-c C-c s" . lsp-rust-analyzer-status)
              ("C-c C-c d" . dap-hydra))
  :config
  (setq lsp-rust-analyzer-cargo-watch-command "clippy")
  (setq lsp-rust-analyzer-server-display-inlay-hints t)
  (setq rustic-format-on-save nil)
  (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))

(defun rk/rustic-mode-hook ()
  (setq-local buffer-save-without-query t))

(setq lsp-rust-analyzer-cargo-watch-command "clippy")
(setq lsp-rust-analyzer-server-display-inlay-hints t)

(add-hook 'rust-mode-hook #'lsp-deferred)
(add-hook 'rustic-mode-hook #'lsp-deferred)

(use-package cargo-mode
  :config
  (add-hook 'rustic-mode-hook 'cargo-minor-mode))


@@ 1374,8 1368,6 @@
   pipenv-projectile-after-switch-function
   #'pipenv-projectile-after-switch-extended))

(add-hook 'python-mode-hook #'lsp-deferred)

;; BUG: Currently, you have to manually activate Hy mode again due to a bug in the package.
;; A PR has been open since February 2021, but not yet merged.
(use-package hy-mode)


@@ 1421,76 1413,37 @@
  :hook ((c-mode c++-mode) . google-set-c-style)
  (c-mode-common . google-make-newline-indent))

(add-hook 'c-mode-hook #'lsp-deferred)
(add-hook 'c++-mode-hook #'lsp-deferred)
(add-hook 'awk-mode-hook #'lsp-deferred)

(use-package arduino-mode)

(use-package web-mode)
(use-package rjsx-mode)
(use-package typescript-mode)
(use-package json-mode)

(use-package prettier-js
  :hook ((javascript-mode js-mode rjsx-mode html-mode css-mode yaml-mode) . prettier-js-mode))

(setq-default flycheck-disabled-checkers
              (append flycheck-disabled-checkers
                      '(javascript-jshint)))

(setq-default flycheck-disabled-checkers
              (append flycheck-disabled-checkers
                      '(json-jsonlist)))

(defun my/use-eslint-from-node-modules ()
  (let* ((root (locate-dominating-file
                (or (buffer-file-name) default-directory)
                "node_modules"))
         (eslint (and root
                      (expand-file-name "node_modules/eslint/bin/eslint.js"
                                        root))))
    (when (and eslint (file-executable-p eslint))
      (setq-local flycheck-javascript-eslint-executable eslint))))

(defun my-web-mode-hook ()
  "Hooks for Web mode. Adjust indents"
  (setq web-mode-markup-indent-offset 2)
  (setq web-mode-css-indent-offset 2)
  (setq web-mode-code-indent-offset 2)
  (setq web-mode-enable-auto-quoting nil)
  (setq web-mode-attr-indent-offset 2)
  (setq web-mode-attr-value-indent-offset 2))
(use-package clojure-mode)
(use-package cider)

(flycheck-add-mode 'typescript-tslint 'web-mode)
(use-package web-mode
  :mode "\\.tsx\\'"
  :custom
  (web-mode-markup-indent-offset 2)
  (web-mode-css-indent-offset 2)
  (web-mode-code-indent-offset 2)
  (web-mode-enable-auto-quoting nil)
  (web-mode-attr-indent-offset 2)
  (web-mode-attr-value-indent-offset 2))

(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
(add-hook 'rjsx-mode-hook #'(lambda () (electric-indent-local-mode -1)))
(add-hook 'rjsx-mode-hook #'lsp-deferred)
(add-hook 'css-mode-hook #'lsp-deferred)
(add-hook 'html-mode-hook #'lsp-deferred)
(add-hook 'web-mode-hook  'my-web-mode-hook)
(add-hook 'web-mode-hook #'lsp-deferred)
(use-package rjsx-mode
  :mode "\\.js.*$")

(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js.*$" . rjsx-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . json-mode))
(use-package typescript-mode)

(show-paren-mode 1)
(use-package json-mode
  :mode "\\.json$")

(use-package parinfer-rust-mode
  :hook ((emacs-lisp-mode clojure-mode lisp-mode hy-mode racket-mode). parinfer-rust-mode)
(use-package prettier-js
  :config
  (setq parinfer-rust-auto-download t))
  (setq prettier-js-show-errors nil))

(use-package clojure-mode)
(use-package cider)

(add-hook 'clojure-mode-hook #'lsp-deferred)
(flycheck-add-mode 'typescript-tslint 'web-mode)

(use-package sly
  :config
  (setq inferior-lisp-program "sbcl"))
(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
(add-hook 'rjsx-mode-hook #'(lambda () (electric-indent-local-mode -1)))

(use-package geiser-mit)



@@ 1502,15 1455,42 @@
  :after geiser-repl
  :config (add-hook 'geiser-repl-mode-hook #'macrostep-geiser-setup))

(use-package racket-mode
(use-package lsp-java
  :disabled)

(use-package kotlin-mode
  :disabled)

(use-package flycheck-kotlin
  :disabled)

(use-package scala-mode
  :mode "\\.s\\(cala\\|bt\\)$"
  :disabled)

(use-package sbt-mode
  :commands sbt-start sbt-command
  :disabled
  :custom
  (sbt:default-command "testQuick")
  :config
  (add-hook 'racket-mode-hook
            (lambda ()
              (define-key racket-mode-map (kbd "<f5>") 'racket-run))))
  ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31
  ;; allows using SPACE when in the minibuffer
  (substitute-key-definition
   'minibuffer-complete-word
   'self-insert-command
   minibuffer-local-completion-map))

(use-package lsp-metals
  :disabled)

;; Much better defaults for Orgmode, these will be modified shortly
(defun +org|setup-ui ()
  "Configures the UI for `org-mode'."
  (org-indent-mode)
  (auto-fill-mode 0)
  (visual-line-mode 1)
  (diminish org-indent-mode)
  (setq-default org-adapt-indentation nil
                org-cycle-include-plain-lists t
                org-eldoc-breadcrumb-separator " → "


@@ 1520,7 1500,7 @@
                org-fontify-whole-heading-line t
                org-footnote-auto-label 'plain
                org-hidden-keywords nil
                org-hide-emphasis-markers nil
                org-hide-emphasis-markers t
                org-hide-leading-stars t
                org-hide-leading-stars-before-indent-mode t
                org-image-actual-width nil


@@ 1545,23 1525,23 @@
      org-edit-src-content-indentation 0)

(font-lock-add-keywords 'org-mode
                          '(("^ *\\([-]\\) "
                             (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
                        '(("^ *\\([-]\\) "
                           (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))

(custom-theme-set-faces
   'user
   '(org-block ((t (:inherit fixed-pitch))))
   '(org-code ((t (:inherit (shadow fixed-pitch)))))
   '(org-document-info ((t (:foreground "dark orange"))))
   '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
   '(org-indent ((t (:inherit (org-hide fixed-pitch)))))
   '(org-link ((t (:foreground "royal blue" :underline t))))
   '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-property-value ((t (:inherit fixed-pitch))) t)
   '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
   '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
   '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))
 'user
 '(org-block ((t (:inherit fixed-pitch))))
 '(org-code ((t (:inherit (shadow fixed-pitch)))))
 '(org-document-info ((t (:foreground "dark orange"))))
 '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
 '(org-indent ((t (:inherit (org-hide fixed-pitch)))))
 '(org-link ((t (:foreground "royal blue" :underline t))))
 '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
 '(org-property-value ((t (:inherit fixed-pitch))) t)
 '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
 '(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
 '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
 '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

(defun ck/org-confirm-babel-evaluate (lang body)
  (not (or (string= lang "latex") (string= lang "emacs-lisp"))))


@@ 1713,30 1693,47 @@
  :custom
  (org-web-tools-pandoc-sleep-time 0.5))

(defun dt/org-babel-tangle-async (file)
  "Invoke `org-babel-tangle-file' asynchronously."
  (message "Tangling %s..." (buffer-file-name))
  (async-start
   (let ((args (list file)))
     `(lambda ()
        (require 'org)
        ;;(load "~/.emacs.d/init.el")
        (let ((start-time (current-time)))
          (apply #'org-babel-tangle-file ',args)
          (format "%.2f" (float-time (time-since start-time))))))
   (let ((message-string (format "Tangling %S completed after " file)))
     `(lambda (tangle-time)
        (message (concat ,message-string
                         (format "%s seconds" tangle-time)))))))

(defun dt/org-babel-tangle-current-buffer-async ()
  "Tangle current buffer asynchronously."
  (dt/org-babel-tangle-async (buffer-file-name)))

(use-package toc-org
  :config
  (add-hook 'org-mode-hook 'toc-org-mode)
  (add-hook 'markdown-mode-hook 'toc-org-mode))
(defun dw/org-present-prepare-slide ()
  (org-overview)
  (org-show-entry)
  (org-show-children))

(defun dw/org-present-hook ()
  (setq-local face-remapping-alist '((default (:height 1.5) variable-pitch)
                                     (header-line (:height 4.5) variable-pitch)
                                     (org-code (:height 1.55) org-code)
                                     (org-verbatim (:height 1.55) org-verbatim)
                                     (org-block (:height 1.25) org-block)
                                     (org-block-begin-line (:height 0.7) org-block)))
  (setq header-line-format " ")
  (org-display-inline-images)
  (dw/org-present-prepare-slide))

(defun dw/org-present-quit-hook ()
  (setq-local face-remapping-alist '((default variable-pitch default)))
  (setq header-line-format nil)
  (org-present-small)
  (org-remove-inline-images))

(defun dw/org-present-prev ()
  (interactive)
  (org-present-prev)
  (dw/org-present-prepare-slide))

(defun dw/org-present-next ()
  (interactive)
  (org-present-next)
  (dw/org-present-prepare-slide))

(use-package org-present
  :bind (:map org-present-mode-keymap
              ("C-c C-j" . dw/org-present-next)
              ("C-c C-k" . dw/org-present-prev))
  :hook ((org-present-mode . dw/org-present-hook)
         (org-present-mode-quit . dw/org-present-quit-hook)))

(use-package org-make-toc
  :hook (org-mode . org-make-toc-mode))

;; NO spell check for embedded snippets
(defadvice org-mode-flyspell-verify (after org-mode-flyspell-verify-hack activate)

M lisp/catsters-exwm.el => lisp/catsters-exwm.el +4 -2
@@ 246,7 246,9 @@ nil if empty or undefined."

(require 'ido)
(use-package windower)
(use-package dmenu)
(use-package app-launcher
:straight '(app-launcher :host github :repo "SebastienWae/app-launcher"))


(require 'browse-url)
(require 'exwm-manage)


@@ 328,7 330,7 @@ See also `process-lines'."
            ;; (,(kbd "s-g") . )
            ;; (,(kbd "s-g") . )
            (,(kbd "s-g") . grep) ;; Grep search in files
            (,(kbd "s-d") . dmenu) ;; Start an application using dmenu
            (,(kbd "s-d") . app-launcher) ;; Start an application using dmenu
            ;; (,(kbd "s-W") . )
            (,(kbd "s-m") . (lambda () ;; Toggle display of mode-line and minibuffer, in an EXWM window
                              (interactive)