diff --git a/config/emacs/.gitignore b/config/emacs/.gitignore
index 1980dcd..c5903e8 100644
--- a/config/emacs/.gitignore
+++ b/config/emacs/.gitignore
@@ -60,3 +60,7 @@ site-lisp/package/
/projectile.cache
config.el
places
+org-roam.db
+elfeed/
+ellama-sessions/
+ollama-buddy-sessions/
diff --git a/config/emacs/config.org b/config/emacs/config.org
index 02c7bd0..422b92f 100644
--- a/config/emacs/config.org
+++ b/config/emacs/config.org
@@ -18,15 +18,18 @@ This is my Emacs config. There are many like it, but this one is mine. According
- [[#suppress-noise][Suppress Noise]]
- [[#macos][MacOS]]
- [[#appearance][Appearance]]
+ - [[#cursor][Cursor]]
- [[#theme][Theme]]
- [[#font-configuration][Font Configuration]]
- [[#mode-line][Mode Line]]
- [[#icons][Icons]]
+ - [[#padding-and-spacing][Padding and Spacing]]
- [[#highlight-changes][Highlight Changes]]
- [[#highlight-keywords][Highlight Keywords]]
- [[#highlight-and-dim-parentheses][Highlight and Dim Parentheses]]
- [[#pretty-symbols][Pretty Symbols]]
- [[#window-focus-flash][Window Focus Flash]]
+ - [[#startup][Startup]]
- [[#ui-behaviour][UI Behaviour]]
- [[#frame-and-window][Frame and Window]]
- [[#line-numbers][Line Numbers]]
@@ -55,9 +58,15 @@ This is my Emacs config. There are many like it, but this one is mine. According
- [[#project-management][Project Management]]
- [[#eshell][EShell]]
- [[#info-pages][Info Pages]]
+ - [[#eww][EWW]]
+ - [[#xwwp][XWWP]]
+ - [[#ollama][Ollama]]
+ - [[#email][Email]]
+ - [[#feeds][Feeds]]
- [[#completion-and-lsp][Completion and LSP]]
- [[#completion-style][Completion Style]]
- [[#minibuffer-completion][Minibuffer Completion]]
+ - [[#floating-minibuffer][Floating Minibuffer]]
- [[#completion-annotations][Completion Annotations]]
- [[#consult][Consult]]
- [[#in-buffer-completion][In-Buffer Completion]]
@@ -70,19 +79,22 @@ This is my Emacs config. There are many like it, but this one is mine. According
- [[#diagnostics][Diagnostics]]
- [[#org-mode][Org Mode]]
- [[#core-configuration][Core Configuration]]
- - [[#heading-bullets][Heading Bullets]]
- [[#org-tempo-snippets][Org Tempo Snippets]]
- [[#link-behaviour][Link Behaviour]]
- [[#tables-of-contents][Tables of Contents]]
- [[#disable-auto-indent][Disable Auto-Indent]]
+ - [[#highlighting][Highlighting]]
+ - [[#roam][Roam]]
+ - [[#agenda][Agenda]]
- [[#language-support][Language Support]]
- [[#lua][Lua]]
+ - [[#pico-8][Pico 8]]
- [[#nix][Nix]]
- [[#cc][C/C++]]
- [[#emacs-lisp][Emacs Lisp]]
- [[#common-lisp][Common Lisp]]
- [[#fennel][Fennel]]
- - [[#markdown-notes][Markdown Notes]]
+ - [[#clojure][Clojure]]
- [[#keybindings][Keybindings]]
:END:
@@ -224,6 +236,15 @@ Don't open files opened from an external source in a new frame on MacOS.
:PROPERTIES:
:CUSTOM_ID: appearance
:END:
+** Cursor
+:PROPERTIES:
+:CUSTOM_ID: cursor
+:END:
+Set the cursor to be a 2-width bar.
+#+begin_src emacs-lisp
+ (setq-default cursor-type '(bar . 2))
+#+end_src
+
** Theme
:PROPERTIES:
:CUSTOM_ID: theme
@@ -239,7 +260,8 @@ Use the =ef-dream= for a comfortable readable experience .
(setq modus-themes-italic-constructs t
modus-themes-bold-constructs t)
- (load-theme 'ef-dream t)
+ (load-theme 'ef-elea-dark t)
+ ;; (load-theme 'ef-kassio t)
#+end_src
** Font Configuration
@@ -251,24 +273,29 @@ Setup both =monospace= and =variable-pitch= fonts along with their sizes in =org
(defun font-setup (&optional frame)
(with-selected-frame (or frame (selected-frame))
- (let* ((fontconf '((fixed-font . "MonofurNerdFont")
- (variable-font . "MonofurNerdFont")
- (size . 13)))
- (fixed-font (cdr (assoc 'fixed-font fontconf)))
- (variable-font (cdr (assoc 'variable-font fontconf)))
- (pt-size (cdr (assoc 'size fontconf)))
- (height (* pt-size 10))
- (frame-font (concat fixed-font "-" (number-to-string pt-size))))
- ; Fixed-width faces
+ (let* ((fontconf '((fixed-font . "Aporetic Sans Mono")
+ (variable-font . "Aporetic Serif")
+ (fixed-size . 16)
+ (variable-size . 16)))
+ (fixed-font (cdr (assoc 'fixed-font fontconf)))
+ (variable-font (cdr (assoc 'variable-font fontconf)))
+ (fixed-pt (cdr (assoc 'fixed-size fontconf)))
+ (variable-pt (cdr (assoc 'variable-size fontconf)))
+ (fixed-height (* fixed-pt 10))
+ (variable-height (* variable-pt 10))
+ (frame-font (concat fixed-font "-" (number-to-string fixed-pt))))
+
+ ; Fixed-width faces (Size: 18)
(dolist (face '(default fixed-pitch))
(set-face-attribute face nil
:font fixed-font
- :height height
+ :height fixed-height
:weight 'regular))
- ; Variable-pitch face
+
+ ; Variable-pitch face (Size: 16)
(set-face-attribute 'variable-pitch nil
:font variable-font
- :height height
+ :height variable-height
:weight 'regular)
; Syntax styling
@@ -298,6 +325,7 @@ Setup both =monospace= and =variable-pitch= fonts along with their sizes in =org
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.4))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.6))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.8 :underline nil))))))))
+
(if (daemonp)
(add-hook 'after-make-frame-functions #'font-setup)
(font-setup))
@@ -374,7 +402,7 @@ Make use of the [[https://www.nerdfonts.com/][Nerd Fonts]] to show icons in Emac
:hook (ibuffer-mode . nerd-icons-ibuffer-mode))
#+end_src
-** COMMENT Padding and Spacing
+** Padding and Spacing
:PROPERTIES:
:CUSTOM_ID: padding-and-spacing
:END:
@@ -448,37 +476,39 @@ For =lisp= modes, highlight parentheses that are local to the current point with
#+begin_src emacs-lisp
(use-package highlight-parentheses
:ensure t
- :custom
- (hl-paren-colors '("white" "#cccccc" "#999999" "#666666" "#444444"))
- (hl-paren-background-colors '(nil nil nil nil nil))
- :config
- (set-face-attribute 'hl-paren-face nil :weight 'bold))
+ :custom (hl-paren-background-colors '(nil nil nil nil nil))
+ :config (set-face-attribute 'hl-paren-face nil :weight 'bold))
- (defface dim-parens-face
- '((t :foreground "#666666"))
- "Face for dimmed parentheses.")
+ (defface dim-parens-face '((t :foreground "gray50")) "Dimmed parens.")
+
+ (defun dim-parens--lerp (frac)
+ (cl-destructuring-bind (br bg bb) (color-name-to-rgb (face-attribute 'default :background nil t))
+ (cl-destructuring-bind (fr fg fb) (color-name-to-rgb (face-attribute 'default :foreground nil t))
+ (format "#%02x%02x%02x"
+ (round (* 255 (+ br (* frac (- fr br)))))
+ (round (* 255 (+ bg (* frac (- fg bg)))))
+ (round (* 255 (+ bb (* frac (- fb bb)))))))))
+
+ (defun dim-parens--apply-colors ()
+ (setq hl-paren-colors (mapcar #'dim-parens--lerp '(1.0 0.75 0.55 0.4 0.3)))
+ (set-face-attribute 'dim-parens-face nil :foreground (dim-parens--lerp 0.25)))
(defun dim-parens--enable ()
- (font-lock-add-keywords
- nil
- '(("[()]" 0 'dim-parens-face t))
- 'append)
+ (dim-parens--apply-colors)
+ (font-lock-add-keywords nil '(("[()]" 0 'dim-parens-face t)) 'append)
(font-lock-flush)
(highlight-parentheses-mode 1))
(defun dim-parens--disable ()
- (font-lock-remove-keywords
- nil
- '(("[()]" 0 'dim-parens-face t)))
+ (font-lock-remove-keywords nil '(("[()]" 0 'dim-parens-face t)))
(font-lock-flush)
(highlight-parentheses-mode -1))
- (define-minor-mode dim-parens-mode
- "Dim all parens, highlighting the enclosing pair at point."
+ (define-minor-mode dim-parens-mode "Dim all parens, highlighting enclosing pair."
:lighter " DimP"
- (if dim-parens-mode
- (dim-parens--enable)
- (dim-parens--disable)))
+ (if dim-parens-mode (dim-parens--enable) (dim-parens--disable)))
+
+ (add-hook 'enable-theme-functions (lambda (_) (dim-parens--apply-colors)))
#+end_src
** Pretty Symbols
@@ -504,6 +534,66 @@ Flash between windows when switching to make obvious which window is active.
(winpulse-mode +1))
#+end_src
+** Startup
+:PROPERTIES:
+:CUSTOM_ID: startup
+:END:
+Startup screen for Emacs with helpful quick links.
+*Packages*: =dashboard= by [[https://github.com/emacs-dashboard/dashboard][The Emacs Dashboard Maintainers]]
+#+begin_src emacs-lisp
+ (use-package dashboard
+ :ensure t
+ :custom
+ (dashboard-center-content t)
+ (dashboard-show-shortcuts nil)
+ (dashboard-display-icons-p t)
+ (dashboard-icon-type 'nerd-icons)
+ (dashboard-set-file-icons t)
+ (dashboard-footer-icon "")
+ (dashboard-recentf-show-base t)
+ (dashboard-recentf-item-format "%s")
+ (dashboard-projects-show-base t)
+ (dashboard-projects-item-format "%s")
+ (dashboard-startupify-list '(dashboard-insert-banner
+ dashboard-insert-newline
+ dashboard-insert-init-info
+ dashboard-insert-items
+ dashboard-insert-newline
+ dashboard-insert-footer))
+ (dashboard-items '((recents . 5)
+ (projects . 5)
+ (agenda . 5)))
+ :config
+ (dashboard-setup-startup-hook))
+
+ (defun dashboard-dynamic-title ()
+ (let* ((day-num (string-to-number (format-time-string "%d")))
+ (suffix (let ((mod10 (% day-num 10))
+ (mod100 (% day-num 100)))
+ (cond
+ ((memq mod100 '(11 12 13)) "th")
+ ((= mod10 1) "st")
+ ((= mod10 2) "nd")
+ ((= mod10 3) "rd")
+ (t "th"))))
+ (month (format-time-string "%B"))
+ (hour (string-to-number (format-time-string "%H")))
+ (time-phrase (cond
+ ((and (>= hour 5) (< hour 9)) "start your day with some")
+ ((and (>= hour 9) (< hour 11)) "a long day ahead for")
+ ((and (>= hour 11) (< hour 19)) "it's a perfect time for")
+ ((and (>= hour 19) (< hour 22)) "end your day with some")
+ t "it's never too late for")))
+ (format "Today is the %d%s of %s, %s Emacs!" day-num suffix month time-phrase)))
+
+ ;(setq dashboard-banner-logo-title (dashboard-dynamic-title))
+ (setq dashboard-init-info (dashboard-dynamic-title))
+
+
+ (add-hook 'dashboard-mode-hook (lambda () (setq-local mode-line-format nil)))
+#+end_src
+
+
* UI Behaviour
:PROPERTIES:
:CUSTOM_ID: ui-behaviour
@@ -542,7 +632,9 @@ Disable the Bell and other unwanted GUI features.
(tool-bar-mode -1)
(scroll-bar-mode -1)
- (menu-bar-mode -1)
+ ;(menu-bar-mode -1)
+
+ ;(add-to-list 'default-frame-alist '(undecorated . t))
#+end_src
** Line Numbers
@@ -555,10 +647,14 @@ Configure line numbers display width and resizing, and display them from startup
display-line-numbers-width 4
display-line-numbers-grow-only t)
- (add-hook 'emacs-startup-hook #'global-display-line-numbers-mode)
+ (global-display-line-numbers-mode 1)
(dolist (hk '(fundamental-mode-hook text-mode-hook Info-mode-hook))
(add-hook hk (lambda () (display-line-numbers-mode -1))))
+
+ (add-hook 'doc-view-mode-hook #'(lambda ()
+ (display-line-numbers-mode -1)))
+
#+end_src
** Scrolling
@@ -858,7 +954,8 @@ Configure =dired-mode= so that directories are always copied and deleted recursi
((dired-mode . dired-hide-details-mode)
(dired-mode . hl-line-mode))
:config
- (setq dired-recursive-copies 'always
+ (setq insert-directory-program "gls"
+ dired-recursive-copies 'always
dired-recursive-deletes 'always
dired-dwim-target t
dired-listing-switches "-lah"))
@@ -913,17 +1010,17 @@ Setup the =eshell= prompt to be both visually appealing and useful.
#+begin_src emacs-lisp
(progn ; TODO: Fix this, as is likely completely broken (No Colour)
(dolist (spec
- '((eshell-prompt-user-face font-lock-keyword-face "Face for the username in the eshell prompt.")
- (eshell-prompt-venv-face font-lock-string-face "Face for the virtualenv name in the eshell prompt.")
- (eshell-prompt-dir-face dired-directory "Face for the directory path in the eshell prompt.")
- (eshell-prompt-git-face magit-tag "Face for the git branch in the eshell prompt.")
- (eshell-prompt-git-dirty-face eshell-prompt-git-face "Face for the git dirty status in the eshell prompt.")
- (eshell-prompt-symbol-face font-lock-builtin-face "Face for the prompt symbol in the eshell prompt.")))
- (cl-destructuring-bind (name inherit doc) spec
- (defface name
- `((t (:inherit ,inherit)))
- doc
- :group 'eshell-prompt)))
+ '((eshell-prompt-user-face font-lock-keyword-face "Face for the username in the eshell prompt.")
+ (eshell-prompt-venv-face font-lock-string-face "Face for the virtualenv name in the eshell prompt.")
+ (eshell-prompt-dir-face dired-directory "Face for the directory path in the eshell prompt.")
+ (eshell-prompt-git-face bookmark-face "Face for the git branch in the eshell prompt.")
+ (eshell-prompt-git-dirty-face bookmark-face "Face for the git dirty status in the eshell prompt.")
+ (eshell-prompt-symbol-face font-lock-builtin-face "Face for the prompt symbol in the eshell prompt.")))
+ (cl-destructuring-bind (name inherit doc) spec
+ (custom-declare-face name
+ `((t (:inherit ,inherit)))
+ doc
+ :group 'eshell-prompt)))
(defun eshell-abbreviate-dir (dir)
"Abbreviate directory to show only the first and the last two components."
@@ -985,6 +1082,154 @@ Configuration for =Info-mode= to set the location for local info files.
(add-to-list 'Info-directory-list (expand-file-name "~/Documents/Info/"))
#+end_src
+** EWW
+:PROPERTIES:
+:CUSTOM_ID: eww
+:END:
+#+begin_src emacs-lisp
+ (add-hook 'eww-mode-hook #'(lambda () (display-line-numbers-mode -1)))
+#+end_src
+
+** XWWP
+:PROPERTIES:
+:CUSTOM_ID: xwwp
+:END:
+Follow links in the webkit browser within emacs using =xwidget-webkit=
+*Packages*: =xwwp= by [[https://github.com/canatella/xwwp][Damien Merenne]]
+#+begin_src emacs-lisp
+ (use-package xwwp
+ :vc (:url "https://github.com/canatella/xwwp" :rev :newest)
+ :ensure t
+ :config
+ (xwwp-follow-link-completion-system 'consult)
+ (defun consult-xwwp-follow-link--preview (candidates update-fn)
+ "Create preview function for xwwp links CANDIDATES by calling UPDATE-FN."
+ (lambda (action cand)
+ (when (and (eq action 'preview) cand)
+ (let* ((selected cand)
+ (rest (seq-filter (lambda (c) (not (eq c selected))) candidates))
+ (xwwp-follow-link-consult-candidates (cons selected rest)))
+ (funcall update-fn)))))
+ (defun xwwp-follow-link-consult-lookup (selected candidates _input _narrow)
+ "Lookup SELECTED in CANDIDATES."
+ (seq-find (lambda (c) (string= (car c) selected)) candidates))
+ :init
+ (require 'xwwp-follow-link-consult)
+ :bind (:map xwidget-webkit-mode-map
+ ("f" . xwwp-follow-link)))
+#+end_src
+
+** Ollama
+:PROPERTIES:
+:CUSTOM_ID: ollama
+:END:
+Interface with a local llm from ollama.
+*Packages*: =ellama= by [[https://github.com/s-kostyaev/ellama][Sergey Kostyaev]]
+#+begin_src emacs-lisp
+ (use-package ellama
+ :ensure t
+ :hook (org-ctrl-c-ctrl-c-hook . ellama-chat-send-last-message)
+ :init (setopt ellama-auto-scroll t))
+#+end_src
+
+** Email
+:PROPERTIES:
+:CUSTOM_ID: email
+:END:
+Manage email from within Emacs.
+*Packages*: =mu4e= by [[https://www.djcbsoftware.nl/code/mu/][Dirk-Jan Binnema]]
+#+begin_src emacs-lisp
+ (add-to-list 'load-path "/opt/homebrew/share/emacs/site-lisp/mu/mu4e")
+ (use-package mu4e
+ :ensure nil
+ :custom
+ (user-full-name "Stefan Roche")
+ (user-mail-address "stefanroche@protonmail.com")
+ (mu4e-maildir "~/.maildir/protonmail")
+ (mu4e-change-filenames-when-moving t)
+ (mu4e-drafts-folder "/Drafts")
+ (mu4e-sent-folder "/Sent")
+ (mu4e-refile-folder "/Archive")
+ (mu4e-trash-folder "/Trash")
+ (mu4e-get-mail-command "mbsync protonmail")
+ (mu4e-update-interval 300)
+ (mu4e-view-show-images t)
+ (mu4e-headers-auto-update t)
+ (mu4e-html2text-command "w3m -T text/html")
+ (mu4e-attachment-dir "~/Downloads")
+ (mu4e-index-cleanup t)
+ (mu4e-index-lazy-check nil)
+ (mu4e-headers-fields
+ '((:from-or-to . 22)
+ (:subject . 60)
+ (:human-date . 12)
+ (:flags . 6)
+ (:mailing-list . 10)))
+ (mu4e-maildir-shortcuts
+ '(("/Inbox" . ?i)
+ ("/Archive" . ?a)
+ ("/Sent" . ?s)
+ ("/Spam" . ?x)))
+ (setq mu4e-bookmarks '(()))
+ :config
+ (add-to-list 'gnutls-trustfiles
+ (expand-file-name "~/.maildir/certificates/cert.pem"))
+ (mu4e-modeline-mode -1))
+
+ (dolist (hook '(mu4e-main-mode-hook
+ mu4e-headers-mode-hook
+ mu4e-view-mode-hook
+ mu4e-compose-mode-hook))
+ (add-hook hook (lambda () (display-line-numbers-mode -1))))
+
+ (use-package smtpmail-multi
+ :ensure t
+ :custom
+ (send-mail-function 'smtpmail-send-it)
+ (message-send-mail-function 'smtpmail-send-it)
+ (smtpmail-smtp-server "127.0.0.1")
+ (smtpmail-smtp-service 1025)
+ (smtpmail-stream-type 'ssl)
+ (smtpmail-auth-credentials "~/.authinfo"))
+#+end_src
+
+** Feeds
+:PROPERTIES:
+:CUSTOM_ID: feeds
+:END:
+Read and tag RSS feeds.
+*Packages*: =elfeed= by [[https://github.com/emacs-elfeed/elfeed][Daniel Mendler]]
+#+begin_src emacs-lisp
+ (use-package elfeed
+ :ensure t
+ :custom
+ ; Open URLs using the internal xwidget webkit browser
+ (browse-url-browser-function 'xwidget-webkit-browse-url)
+ ; Disable read-unread feature
+ (elfeed-initial-tags '())
+ (elfeed-search-filter "@6months")
+ :config
+ (setq elfeed-feeds
+ ; Websites
+ '(("https://hnrss.org/best" computing social)
+ ("https://protesilaos.com/master.xml" computing blog)
+ ("https://feeds.bbci.co.uk/news/rss.xml" news uk)
+ ; Reddit
+ ("https://old.reddit.com/r/goodnewsuk.rss" news uk social)
+ ("https://old.reddit.com/r/emacs.rss" computing social)
+ ("https://old.reddit.com/r/lua.rss" computing social)
+ ; Youtube
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g" computing youtube)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCj1_pZ7vmxnhy5clIcMVJtg" news uk youtube)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCEbYhDd6c6vngsF5PQpFVWg" computing youtube)
+ ("https://www.youtube.com/feeds/videos.xml?channel_id=UCdT68dsulMFouI2InvXWM5w" computing youtube)))
+ (dolist (hook '(elfeed-search-mode-hook
+ elfeed-tree-mode-hook
+ elfeed-show-mode-hook))
+ (add-hook hook (lambda () (display-line-numbers-mode -1))))
+ (set-face-attribute 'elfeed-search-title-face nil :inherit 'elfeed-search-unread-title-face))
+#+end_src
+
* Completion and LSP
:PROPERTIES:
:CUSTOM_ID: completion-and-lsp
@@ -1019,6 +1264,19 @@ Enable powerful minibuffer completion with fuzzy finding.
("DEL" . vertico-directory-delete-char)))
#+end_src
+** Floating Minibuffer
+:PROPERTIES:
+:CUSTOM_ID: floating-minibuffer
+:END:
+Float the minibuffer in a posframe in the centre of the screen.
+*Packages*: =vertico-posframe= by [[https://github.com/tumashu/vertico-posframe][tumashu]]
+#+begin_src emacs-lisp
+ (use-package vertico-posframe
+ :ensure t
+ :config
+ (vertico-posframe-mode 1))
+#+end_src
+
** Completion Annotations
:PROPERTIES:
:CUSTOM_ID: completion-annotations
@@ -1030,8 +1288,8 @@ Give completions annotations to describe what a function does.
:ensure t
:after vertico consult nerd-icons
:hook
- ((emacs-startup . marginalia-mode)
- (marginalia-mode . nerd-icons-completion-marginalia-setup)))
+ ((emacs-startup . marginalia-mode)))
+ ;(marginalia-mode . nerd-icons-completion-marginalia-setup)))
#+end_src
** Consult
@@ -1304,15 +1562,30 @@ Configuration for =org-mode= for code blocks and cleaner looks.
; Don't confirm when evaluating a code block
org-confirm-babel-evaluate nil
; Make org documents more seamless by hiding markup
- org-hide-emphasis-markers t)
-
+ org-hide-emphasis-markers t
+ ; Don't indent tags
+ org-tags-column 0
+ ; Don't split line on M-Ret
+ org-M-RET-may-split-line '((default . nil))
+ ; Respect section text on M-Ret
+ org-insert-heading-respect-content t
+ ; Log Time of task completion
+ org-log-done 'time
+ ; Log into a drawer to keep hidden
+ org-log-into-drawer t
+ ; Setup keywords for todo
+ org-todo-keywords '((sequence "TODO(t)" "ACTIVE(a!)" "HOLD(h!)" "|" "CANCEL(c!)" "DONE(d!)")))
; Enable a non-monospace font for org documents
(add-hook 'org-mode-hook 'variable-pitch-mode)
; Enable line wrapping for org documents
(add-hook 'org-mode-hook 'visual-line-mode)
+ ; Disable flycheck in org mode
+ (add-hook 'org-mode-hook #'(lambda () (flycheck-mode -1)))
+ ; Enable corfu for org roam
+ (add-hook 'org-mode-hook 'corfu-mode)
#+end_src
-** Heading Bullets
+** COMMENT Heading Bullets
:PROPERTIES:
:CUSTOM_ID: heading-bullets
:END:
@@ -1372,6 +1645,46 @@ Disable automatic indentation when editing org documents.
(add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1)))
#+end_src
+** Highlighting
+:PROPERTIES:
+:CUSTOM_ID: highlighting
+:END:
+Highlight text in Org Mode in different faces.
+*Packages*: =org-remark= by [[https://nobiot.github.io/org-remark/][nobiot]]
+#+begin_src emacs-lisp
+ (use-package org-remark
+ :ensure t)
+#+end_src
+
+** Roam
+:PROPERTIES:
+:CUSTOM_ID: roam
+:END:
+Make zettelkasten method notes with Org.
+*Packages*: =org-roam= by [[https://www.orgroam.com/][The Org-roam Maintainers]]
+#+begin_src emacs-lisp
+ (use-package org-roam
+ :ensure t
+ :custom
+ (org-roam-directory (file-truename "~/Documents/Roam"))
+ (org-roam-completion-everywhere t)
+ :config
+ (org-roam-setup))
+#+end_src
+
+** Agenda
+:PROPERTIES:
+:CUSTOM_ID: agenda
+:END:
+Schedule life with Org Mode.
+#+begin_src emacs-lisp
+ (setq org-agenda-files
+ '("~/Documents/Agenda.org")
+ org-agenda-span 10
+ org-agenda-start-on-weekday nil
+ org-agenda-start-day "-2d")
+#+end_src
+
* Language Support
:PROPERTIES:
:CUSTOM_ID: language-support
@@ -1434,6 +1747,16 @@ Disable automatic indentation when editing org documents.
'(:documentOnTypeFormattingProvider))
#+end_src
+** Pico 8
+:PROPERTIES:
+:CUSTOM_ID: pico-8
+:END:
+#+begin_src emacs-lisp
+ (use-package pico8-mode
+ :vc (:url "https://github.com/Kaali/pico8-mode.git")
+ :ensure t)
+#+end_src
+
** Nix
:PROPERTIES:
:CUSTOM_ID: nix
@@ -1578,7 +1901,49 @@ Disable automatic indentation when editing org documents.
(transient-setup 'fennel-transient))
#+end_src
-** Markdown Notes
+** Clojure
+:PROPERTIES:
+:CUSTOM_ID: clojure
+:END:
+*Packages*: =cider= by [[https://cider.mx/][Bozhidar Batsov]]
+#+begin_src emacs-lisp
+ (use-package cider
+ :ensure t
+ :hook ((cider-repl-mode . (lambda () (display-line-numbers-mode -1)))
+ (cider-repl-mode . smartparens-mode)
+ (cider-repl-mode . corfu-mode))
+ ;(clojure-mode . eglot-ensure))
+ :custom
+ (cider-shadow-cljs-command "bunx shadow-cljs")
+ :config
+ (setq-default cider-eldoc-display-for-symbol-at-point nil)
+
+ (defun mu-cider-disable-eldoc ()
+ "Let LSP handle ElDoc instead of CIDER."
+ (remove-hook 'eldoc-documentation-functions #'cider-eldoc t))
+
+ (add-hook 'cider-mode-hook #'mu-cider-disable-eldoc))
+
+ ;; (defun mu-cider-disable-completion ()
+ ;; "Let LSP handle completion instead of CIDER."
+ ;; (remove-hook 'completion-at-point-functions #'cider-complete-at-point t))
+
+ ;; (add-hook 'cider-mode-hook #'mu-cider-disable-completion)
+
+ (use-package flycheck-clj-kondo
+ :ensure t)
+
+ (use-package flycheck-joker
+ :ensure t)
+
+ (use-package clojure-mode
+ :ensure t
+ :config
+ (require 'flycheck-clj-kondo)
+ (require 'flycheck-joker))
+#+end_src
+
+** COMMENT Markdown Notes
:PROPERTIES:
:CUSTOM_ID: markdown-notes
:END:
@@ -1628,13 +1993,6 @@ Disable automatic indentation when editing org documents.
:ensure t)
#+end_src
-* COMMENT Testing
-:PROPERTIES:
-:CUSTOM_ID: testing
-:END:
-#+begin_src emacs-lisp
-#+end_src
-
* Keybindings
:PROPERTIES:
:CUSTOM_ID: keybindings
@@ -1677,10 +2035,11 @@ This section contains one large =emacs-lisp= block that contains all the custom
(which-key-add-key-based-replacements "C-c s" "search-lines")
;; Go to line
- (keymap-global-set "M-g M-g" 'consult-goto-line)
- (keymap-global-set "M-g g" 'consult-goto-line)
- (keymap-global-set "C-c g" 'consult-goto-line)
- (which-key-add-key-based-replacements "C-c g" "goto-line")
+ (keymap-global-set "M-g" 'consult-goto-line)
+
+ ;; Go to imenu
+ (keymap-global-set "C-c g" 'consult-imenu)
+ (which-key-add-key-based-replacements "C-c g" "imenu")
;; Find Files
(keymap-global-set "C-c f f" 'affe-find)
@@ -1691,6 +2050,8 @@ This section contains one large =emacs-lisp= block that contains all the custom
(which-key-add-key-based-replacements "C-c f c" "find-config")
(keymap-global-set "C-c f t" (lambda () (interactive) (find-file "~/Documents/Notes/TODO.md")))
(which-key-add-key-based-replacements "C-c f t" "find-todo")
+ (keymap-global-set "C-c f a" (lambda () (interactive) (find-file "~/Documents/Agenda.org")))
+ (which-key-add-key-based-replacements "C-c f t" "find-agenda")
(which-key-add-key-based-replacements "C-c f" "find-file")
;; Denote
@@ -1706,16 +2067,28 @@ This section contains one large =emacs-lisp= block that contains all the custom
;; (which-key-add-key-based-replacements "C-c n" "denotes")
;; ZK Notes
- (keymap-global-set "C-c n a" 'zk4e-alias)
- (keymap-global-set "C-c n e" 'zk4e-edit)
- (keymap-global-set "C-c n d" (lambda () (interactive) (zk4e-new "Diario")))
- (which-key-add-key-based-replacements "C-c n d" "zk4e-diario")
- (which-key-add-key-based-replacements "C-c n" "zk4e")
+ ;; (keymap-global-set "C-c k a" 'zk4e-alias)
+ ;; (keymap-global-set "C-c k e" 'zk4e-edit)
+ ;; (keymap-global-set "C-c k d" (lambda () (interactive) (zk4e-new "Diario")))
+ ;; (which-key-add-key-based-replacements "C-c k d" "zk4e-diario")
+ ;; (which-key-add-key-based-replacements "C-c k" "zk4e")
+
+ ;; Org Roam
+ (keymap-global-set "C-c n l" 'org-roam-buffer-toggle)
+ (keymap-global-set "C-c n f" 'org-roam-node-find)
+ (keymap-global-set "C-c n i" 'org-roam-node-insert)
+ (keymap-global-set "C-c n c" 'org-id-get-create)
+ (keymap-global-set "C-c n a a" 'org-roam-alias-add)
+ (keymap-global-set "C-c n a d" 'org-roam-alias-remove)
+ (which-key-add-key-based-replacements "C-c n a" "alias")
+ (which-key-add-key-based-replacements "C-c n" "org-roam")
;; Modus Themes
- (keymap-global-set "C-c v t" 'modus-themes-toggle)
- (keymap-global-set "C-c v s" 'modus-themes-select)
- (which-key-add-key-based-replacements "C-c v" "vivendi-theme")
+ ;; (keymap-global-set "C-c v t" 'modus-themes-toggle)
+ ;; (keymap-global-set "C-c v s" 'modus-themes-select)
+ ;; (which-key-add-key-based-replacements "C-c v" "vivendi-theme")
+
+ (keymap-global-set "C-c b" 'ellama)
;; Yasnippet
(keymap-global-set "C-c y n" 'yas-new-snippet)
@@ -1735,4 +2108,34 @@ This section contains one large =emacs-lisp= block that contains all the custom
(define-key lisp-mode-map (kbd "C-c l") (lambda ()
(interactive)
(call-interactively #'lisp-transient)))
+
+ ;; Webapps
+ (keymap-global-set "C-c w w" 'webapp-dashboard)
+ (keymap-global-set "C-c w e" (lambda () (interactive)(webapp-open 'ProtonMail)))
+ (which-key-add-key-based-replacements "C-c w e" "protonmail")
+ (keymap-global-set "C-c w g" (lambda () (interactive)(webapp-open 'Git)))
+ (which-key-add-key-based-replacements "C-c w g" "git")
+ (keymap-global-set "C-c w j" (lambda () (interactive)(webapp-open 'Jellyfin)))
+ (which-key-add-key-based-replacements "C-c w j" "jellyfin")
+ (keymap-global-set "C-c w l" (lambda () (interactive)(webapp-open 'Lumo)))
+ (which-key-add-key-based-replacements "C-c w l" "lumo")
+ (keymap-global-set "C-c w c" (lambda () (interactive)(webapp-open 'Claude)))
+ (which-key-add-key-based-replacements "C-c w c" "claude")
+ (keymap-global-set "C-c w b" (lambda () (interactive)(webapp-open 'Browse)))
+ (which-key-add-key-based-replacements "C-c w c" "browse")
+ (keymap-global-set "C-c w r" 'webapp-reload)
+ (keymap-global-set "C-c w R" 'webapp-register)
+ (keymap-global-set "C-c w y" 'webapp-copy-url)
+ (keymap-global-set "C-c w s" 'webapp-suspend)
+ (keymap-global-set "C-c w S" 'webapp-suspend-all)
+ (which-key-add-key-based-replacements "C-c w" "webapps")
+
+ ;; Agenda
+ (keymap-global-set "C-c a" 'org-agenda)
+
+ ;; Email
+ (keymap-global-set "C-c e" 'mu4e)
+
+ ;; Elfeed
+ (keymap-global-set "C-c F" 'elfeed)
#+end_src
|