Mostly config updates for emacs init.org

This commit is contained in:
Ian Keane 2023-11-30 14:20:25 -05:00
parent 0db94f8ba4
commit 66a20c32b0

View file

@ -26,11 +26,13 @@ To get started, run =C-c C-v t=
(let ((org-confirm-babel-evaluate nil))
(org-babel-tangle))))
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'dotfiles/org-babel-tangle-config)))
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'after-save-hook #'dotfiles/org-babel-tangle-config)))
#+end_src
** Package initialization
- =TODO:= savehist mode doesn't seem to save the history correctly
#+begin_src emacs-lisp
;; Initialize Package Sources
(require 'package)
(setq package-archives
@ -47,12 +49,13 @@ To get started, run =C-c C-v t=
(setq use-package-always-ensure t)
(package-refresh-contents)
;; Persist history over Emacs restarts. Vertico sorts by history position.
(use-package savehist
:init
(savehist-mode))
#+end_src
** Straight
I don't use straight for much currently, but needed it in order to install beancount-mode and intend to migrate all my packages to it eventually.
#+begin_src emacs-lisp
(defvar bootstrap-version)
(let ((bootstrap-file
@ -72,58 +75,50 @@ To get started, run =C-c C-v t=
(setq package-enable-at-startup nil)
#+end_src
** Environment-specific setup
** Password Retrieval
=password-store= integrations require you to have =pass= and =pinentry= configured on your local system outside of emacs.
#+begin_src emacs-lisp
(use-package pinentry)
(use-package pass)
(use-package password-store)
(pinentry-start)
#+end_src
** Variables
Things referenced throughout the config which are specific to me
#+begin_src emacs-lisp
(setq user-init-file (expand-file-name "~/.config/emacs/init.el"))
(setq IS-MACOS (eq system-type 'darwin))
(setq openai-key-string
(if IS-MACOS "self/openai-alt" "openai-alt"))
#+end_src
** Secrets
#+begin_src emacs-lisp
(use-package pinentry
:ensure t)
(use-package pass
:ensure t)
(use-package password-store)
(pinentry-start)
(setq gptel-api-key (password-store-get openai-key-string)) ;; TODO if-macos
#+end_src
** Global variables
** Handle config file
#+begin_src emacs-lisp
(setq user-init-file (expand-file-name "~/.config/emacs/init.el"))
(defun reload-config ()
"Reload the Emacs configuration."
(interactive)
(load-file user-init-file))
(setq gptel-api-key (password-store-get openai-key-string))
#+end_src
** Required directories for emacs setup
Eventually I'll set this up so that all these directories are set in the config of their respective packages; I'll still run ensure-directory on all of them beforehand though.
#+begin_src emacs-lisp
(defun ensure-directory (dir)
(defun ian/ensure-directory (dir)
"Ceate a dir if it doesn't exist."
(unless (file-directory-p dir)
(make-directory dir t)))
(ensure-directory "~/.config/emacs/backups/")
(ensure-directory "~/.config/emacs/autosaves")
(ensure-directory "~/notes/roam")
(ensure-directory "~/notes/deft")
(ensure-directory "~/notes/code")
(ensure-directory "~/.config/emacs/video")
(ensure-directory "~/.config/emacs/audio")
(ian/ensure-directory "~/.config/emacs/backups/")
(ian/ensure-directory "~/.config/emacs/autosaves")
(ian/ensure-directory "~/notes/roam")
(ian/ensure-directory "~/notes/deft")
(ian/ensure-directory "~/notes/code")
(ian/ensure-directory "~/.config/emacs/video")
(ian/ensure-directory "~/.config/emacs/audio")
(setq projectile-project-search-path '("~/code/")
empv-video-dir "~/.config/emacs/video"
empv-audio-dir "~/.config/emacs/audio"
backup-directory-alist `(("." . "~/.config/emacs/backups/"))
auto-save-file-name-transforms `((".*" "~/.config/emacs/autosaves/" t)))
#+end_src
** Helper Functions
#+begin_src emacs-lisp
(defun ian/eval-region-or-buffer ()
"Eval the region if anything is selected, otherwise eval the whole buffer."
(interactive)
@ -138,25 +133,12 @@ To get started, run =C-c C-v t=
(consult-org-heading)
(consult-imenu)))
#+end_src
* One-Line Includes
TODO: rename this section
#+begin_src emacs-lisp
(use-package treemacs)
;; Enable follow mode
;; Use treemacs-current-visibility function to expand backspace functionality
(setq treemacs--project-follow-delay 0)
(defun ian/treemacs-open-current-or-jump ()
"Find the current file and open treemacs if it's not open, otherwise jump
to the treemacs window"
(defun ian/reload-config ()
"Reload the Emacs configuration."
(interactive)
(if
(not(eq (treemacs-current-visibility) 'visible))
(treemacs-find-file))
(treemacs-select-window))
(load-file user-init-file))
#+end_src
* Notes
#+begin_src emacs-lisp
(use-package deft)
(setq deft-recursive t
@ -164,13 +146,15 @@ TODO: rename this section
#+end_src
* AI
#+begin_src emacs-lisp
(use-package gptel)
(setq gptl-default-mode 'org-mode)
(use-package gptel)
(setq gptl-default-mode 'org-mode)
#+end_src
* Org Mode
#+begin_src emacs-lisp
(use-package org)
;; (add-hook 'org-mode-hook 'yas-minor-mode)
(add-hook 'org-mode-hook 'yas-minor-mode)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
@ -190,12 +174,9 @@ TODO: rename this section
:hook (org-mode . org-appear-mode))
(use-package org-roam
:ensure t
:custom
(org-roam-directory "~/notes/roam")
:config
;; If you're using a vertical completion framework, you might want a more informative completion interface
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
(org-roam-db-autosync-mode))
(use-package deft
@ -216,11 +197,41 @@ TODO: rename this section
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
(use-package ox-gfm)
(use-package ox-gfm) ; github-flavored-markdown exporter
#+end_src
* Basic Appearance and Behaviors
** Font and Theme
#+begin_src emacs-lisp
(setq inhibit-startup-message t)
(use-package doom-themes
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
;; Enable flashing mode-line on errors
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
(load-theme 'doom-oceanic-next t)
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
(set-frame-font "DejaVu Sans Mono 16")
;; (use-package base16-theme)
;; (load-theme 'base16-oceanicnext t)
(use-package default-text-scale
:defer 1
:config
(default-text-scale-mode))
#+end_src
** Cosmetic
#+begin_src emacs-lisp
(setq fancy-splash-image "~/dotfiles/guix/sink.png") ;; the best emacs logo
(setq lsp-lens-enable nil) ;; gets rid of the '0 references' note from lsp
;; remove visual noise
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
@ -228,6 +239,39 @@ TODO: rename this section
(savehist-mode 1) ; remember previous commands in minibuffer
(save-place-mode 1) ; put cursor in last place when opening a file
(global-display-line-numbers-mode t)
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package solaire-mode
:config (solaire-global-mode +1))
(use-package simple-modeline
:hook (after-init . simple-modeline-mode))
;; turn off number mode in some contexts
(dolist (mode
'(org-mode-hook
term-mode-hook
eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
(column-number-mode)
#+end_src
** Buffers
=TODO:= Make this use currently selected buffer
#+begin_src emacs-lisp
;; Generate buffers in last window
(setq display-buffer-base-action
'(display-buffer-reuse-mode-window
display-buffer-reuse-window
display-buffer-same-window))
#+end_src
** Behavioral Tweaks
#+begin_src emacs-lisp
(when IS-MACOS
(setq mac-pass-command-to-system nil))
;; Avoid customization UI auto-variables in init.el
(setq custom-file (locate-user-emacs-file "custom-vars.el"))
(load custom-file 'noerror 'nomessage)
@ -238,63 +282,16 @@ TODO: rename this section
;; Update files when changed on disk
(global-auto-revert-mode 1)
(use-package solaire-mode
:config (solaire-global-mode +1))
(use-package doom-themes
:ensure t
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
;; (load-theme 'doom-one t)
;; Enable flashing mode-line on errors
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
(set-frame-font "DejaVu Sans Mono 17")
(use-package simple-modeline
:hook (after-init . simple-modeline-mode))
(use-package base16-theme)
(load-theme 'base16-oceanicnext t)
(global-display-line-numbers-mode t)
(dolist (mode
'(org-mode-hook
term-mode-hook
eshell-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
(column-number-mode)
(use-package default-text-scale
:defer 1
:config
(default-text-scale-mode))
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package helpful) ; Slightly more helpful help
(setq tab-always-indent 'complete)
(setq tab-first-completion 'word)
;; Generate buffers in last window
(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)
(setq whitespace-style '(trailing tabs newline tab-mark )) ; show tab characters
(setq tab-always-indent 'complete)
(setq tab-first-completion 'word)
(setq indent-tabs-mode nil) ; tabs not spaces
(visual-line-mode)
(visual-line-mode) ; wrap long lines visually
#+end_src
** Tab bar
#+begin_src emacs-lisp
@ -319,40 +316,14 @@ TODO: rename this section
(balance-windows)
(other-window 1))
#+end_src
** Direct keymaps
** Windows and Workspaces
[[https://github.com/abo-abo/ace-window/issues/216][Credit]] for manual dispatch function. =TODO:= Window width controls
#+begin_src emacs-lisp
;; (global-set-key (kbd "s-c") 'delete-window)
;; (global-set-key (kbd "s-h") 'windmove-left)
;; (global-set-key (kbd "s-j") 'windmove-down)
;; (global-set-key (kbd "s-k") 'windmove-up)
;; (global-set-key (kbd "s-l") 'windmove-right)
;; (define-key evil-normal-state-map (kbd "s-d") 'kill-this-buffer)
;; (define-key evil-normal-state-map (kbd "s-n") 'projectile-next-project-buffer)
;; (define-key evil-normal-state-map (kbd "s-p") 'projectile-previous-project-buffer)
;; (define-key evil-normal-state-map (kbd "s-J") 'split-and-follow-horizontally)
;; (define-key evil-normal-state-map (kbd "s-L") 'split-and-follow-vertically)
;; (define-key evil-normal-state-map (kbd "s-b") 'buffer-menu)
;; (define-key evil-normal-state-map (kbd "s-x") 'execute-extended-command)
;; (global-set-key (kbd "s-SPC") 'tab-next)
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(use-package winner
:after evil
:config
(winner-mode))
#+end_src
** Windows and Workspaces
[[https://github.com/abo-abo/ace-window/issues/216][Credit]] for manual dispatch function
#+begin_src emacs-lisp
(defun ace-window-manual-dispatch (arg)
"Calls `ace-window' with ARG asking for the dispatch, even if `aw-dispatch-always' is nil.
This could be useful to use the advanced commands"
(interactive "p")
(let ((aw-dispatch-always t))
(ace-window arg)
))
(use-package ace-window)
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
(setq aw-dispatch-alist
@ -373,21 +344,26 @@ TODO: rename this section
(?o delete-other-windows "Delete Other Windows")
(?? aw-show-dispatch-help)))
(setq aw-scope 'frame)
;; TODO: Window width controls
(defun ace-window-manual-dispatch (arg)
"Calls `ace-window' with ARG asking for the dispatch, even if `aw-dispatch-always' is nil.
This could be useful to use the advanced commands"
(interactive "p")
(let ((aw-dispatch-always t))
(ace-window arg)
))
#+end_src
** Dired
#+begin_src emacs-lisp
(setq ring-bell-function 'ignore)
(setq dired-listing-switches "-al")
(setq dired-dwim-target t) ; opening 'other window' on a subdir enters 2 window dired mode for copy/paste
;; opening 'other window' on a subdir enters 2 window dired mode for copy/paste
(setq dired-dwim-target t)
(use-package dired-single)
(defun my-dired-init ()
"Bunch of stuff to run for dired, either immediately or when it's
loaded."
;; <add other stuff here>
"Bunch of stuff to run for dired, either immediately or when it's loaded."
(define-key dired-mode-map [remap dired-find-file]
'dired-single-buffer)
(define-key dired-mode-map [remap dired-mouse-find-file-other-window]
@ -397,9 +373,7 @@ TODO: rename this section
;; if dired's already loaded, then the keymap will be bound
(if (boundp 'dired-mode-map)
;; we're good to go; just add our bindings
(my-dired-init)
;; it's not loaded yet, so add our bindings to the load-hook
(add-hook 'dired-load-hook 'my-dired-init))
(use-package dired-open
@ -413,6 +387,20 @@ TODO: rename this section
#+end_src
** Treemacs
#+begin_src emacs-lisp
(use-package treemacs)
;; Follow project buffers instantly
(setq treemacs--project-follow-delay 0)
(defun ian/treemacs-open-current-or-jump ()
"Find the current file and open treemacs if it's not open, otherwise jump
to the treemacs window"
(interactive)
(if
(not(eq (treemacs-current-visibility) 'visible))
(treemacs-find-file))
(treemacs-select-window))
(use-package all-the-icons)
(use-package treemacs-all-the-icons)
#+end_src
@ -425,12 +413,11 @@ TODO: rename this section
(setq which-key-idle-delay 0.3))
#+end_src
** General
- map spc W for split and winner-undo / redo operations on 2 windows
- bind persp-mode
I know these could be bound on a per-package basis, but since this is my primary interface with emacs I'd rather keep all keymaps in one place, both for reference and to discourage myself from organizing my top-level bindings on a per-plugin basis rather than keeping the focus on functionality.
=TODO:=
- bind lispy for colemak-dh
- bind lispy doc features and ide-like features
- bind embark
- bind commentary
#+begin_src emacs-lisp
(use-package general
:ensure t
@ -445,7 +432,7 @@ TODO: rename this section
;; Top level bindings
"SPC" '(projectile-find-file :which-key "Find project file")
"<backspace>" '(ian/treemacs-open-current-or-jump :which-key "Find current file in sidebar") ; TODO or treemacs-select-window
"<backspace>" '(ian/treemacs-open-current-or-jump :which-key "Find current file in sidebar")
"," '(+ivy/switch-workspace-buffer :which-key "Buffers (workspace)")
"/" '(consult-ripgrep :which-key "Search project")
":" '(execute-extended-command :which-key "M-x")
@ -453,7 +440,6 @@ TODO: rename this section
"<" '(consult-buffer :which-key "Buffers (all)")
"x" '(scratch-buffer :which-key "Scratch popup")
"-" '(dired :which-key "Find Directory")
;; "*" '(counsel-locate :which-key "Fuzzy find file") ;; find-file? consult-locate?
"d" '(docker :which-key "Docker")
"i" '(ian/conditional-imenu :which-key "Imenu") ;; consult-outline?
"w" '(ace-window :which-key "Window")
@ -509,7 +495,7 @@ TODO: rename this section
"f" '(:ignore t :which-key "File")
;; "fp" '(doom/open-private-config :which-key "Browse private config")
"fr" '(consult-recent-file :which-key "Recent files")
"fR" '(reload-config :which-key "Reload config")
"fR" '(ian/reload-config :which-key "Reload config")
;; "fm" '(doom/move-this-file :which-key "Move/rename file")
;; "fS" '(doom/sudo-find-file :which-key "Sudo find file")
;; "fs" '(doom/sudo-this-file :which-key "Sudo this file")
@ -708,18 +694,6 @@ TODO: rename this section
(use-package vertico
:init
(vertico-mode)
;; Different scroll margin
;; (setq vertico-scroll-margin 0)
;; Show more candidates
;; (setq vertico-count 20)
;; Grow and shrink the Vertico minibuffer
;; (setq vertico-resize t)
;; Optionally enable cycling for `vertico-next' and `vertico-previous'.
;; (setq vertico-cycle t)
)
#+end_src
** Consult
@ -746,14 +720,9 @@ Idk I think this came from the vertico readme
;; Do not allow the cursor in the minibuffer prompt
(setq minibuffer-prompt-properties
'(read-only t cursor-intangible t face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
;; Emacs 28: Hide commands in M-x which do not work in the current mode.
;; Vertico commands are hidden in normal buffers.
;; (setq read-extended-command-predicate
;; #'command-completion-default-include-p)
;; Enable recursive minibuffers
(setq enable-recursive-minibuffers t))
(setq completion-styles '(basic substring partial-completion flex))
#+end_src
@ -761,9 +730,6 @@ Idk I think this came from the vertico readme
#+begin_src emacs-lisp
(use-package orderless
:init
;; Configure a custom style dispatcher (see the Consult wiki)
;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch)
;; orderless-component-separator #'orderless-escapable-split-on-space)
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
@ -771,18 +737,8 @@ Idk I think this came from the vertico readme
** Marginalia
#+begin_src emacs-lisp
(use-package marginalia
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
;; available in the *Completions* buffer, add it to the
;; `completion-list-mode-map'.
:bind (:map minibuffer-local-map
("M-A" . marginalia-cycle))
;; The :init section is always executed.
:bind (:map minibuffer-local-map ("M-A" . marginalia-cycle))
:init
;; Marginalia must be activated in the :init section of use-package such that
;; the mode gets enabled right away. Note that this forces loading the
;; package.
(marginalia-mode))
#+end_src
** Company-mode
@ -825,8 +781,8 @@ Idk I think this came from the vertico readme
nil
(window-parameters (mode-line-format . none)))))
;; Consult users will also want the embark-consult package.
(use-package embark-consult
;; Consult users will also want the embark-consult package.
(use-package embark-consult
:ensure t ; only need to install it, embark loads it after consult if found
:hook
(embark-collect-mode . consult-preview-at-point-mode))
@ -864,7 +820,7 @@ Idk I think this came from the vertico readme
:ensure t
:mode "\\.rs\\'"
:config
(setq rust-format-on-save t)) ; Automatically format rust files on save
(setq rust-format-on-save t))
(use-package cargo
:ensure t
@ -888,31 +844,31 @@ All lisp-family languages
* Markups
** Markdown
#+begin_src emacs-lisp
(use-package markdown-mode
:mode ("\\.md\\'" . markdown-mode))
;;(use-package evil-markdown
;; :mode ("\\.md\\'" . evil-markdown-mode))
(use-package markdown-mode)
(use-package evil-markdown
:mode ("\\.md\\'" . evil-markdown-mode))
(use-package json-mode)
(use-package yaml-mode)
#+end_src
** Beancount
This is mostly lifted from the doom emacs config. Beancount-mode by default has a pretty borked tab function.
#+begin_src emacs-lisp
(defun beancount-tab-function ()
(defun beancount-tab-function ()
"Improved beancount tab ripped off from doom emacs"
(interactive)
(if (and outline-minor-mode (outline-on-heading-p))
(beancount-outline-cycle)
(indent-according-to-mode)))
(use-package beancount
(use-package beancount
:straight (beancount :type git :host github :repo "beancount/beancount-mode")
:mode ("\\.beancount\\'" . beancount-mode)
:hook (beancount-mode . outline-minor-mode)
:config
(evil-define-key 'normal 'beancount-mode-map (kbd "TAB") 'beancount-tab-function)
) ;; Bind the TAB key
(evil-define-key 'normal 'beancount-mode-map
(kbd "TAB") 'beancount-tab-function)) ;; Bind the TAB key
(add-hook 'beancount-mode-hook #'flymake-bean-check-enable)
(add-hook 'beancount-mode-hook #'flymake-bean-check-enable)
#+end_src
* Shells
** Enable fish completions
@ -932,101 +888,16 @@ Uses the external fish program to provide fish-style completions to eshell etc
(use-package magit-todos)
(setq magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1)
#+end_src
* Meow
#+begin_src emacs-lisp
; (use-package 'meow)
; (defun meow-setup ()
; (setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak)
; (meow-motion-overwrite-define-key
; ;; Use e to move up, n to move down.
; ;; Since special modes usually use n to move down, we only overwrite e here.
; '("e" . meow-prev)
; '("<escape>" . ignore))
; (meow-leader-define-key
; '("?" . meow-cheatsheet)
; ;; To execute the originally e in MOTION state, use SPC e.
; '("e" . "H-e")
; '("1" . meow-digit-argument)
; '("2" . meow-digit-argument)
; '("3" . meow-digit-argument)
; '("4" . meow-digit-argument)
; '("5" . meow-digit-argument)
; '("6" . meow-digit-argument)
; '("7" . meow-digit-argument)
; '("8" . meow-digit-argument)
; '("9" . meow-digit-argument)
; '("0" . meow-digit-argument))
; (meow-normal-define-key
; '("0" . meow-expand-0)
; '("1" . meow-expand-1)
; '("2" . meow-expand-2)
; '("3" . meow-expand-3)
; '("4" . meow-expand-4)
; '("5" . meow-expand-5)
; '("6" . meow-expand-6)
; '("7" . meow-expand-7)
; '("8" . meow-expand-8)
; '("9" . meow-expand-9)
; '("-" . negative-argument)
; '(";" . meow-reverse)
; '("," . meow-inner-of-thing)
; '("." . meow-bounds-of-thing)
; '("[" . meow-beginning-of-thing)
; '("]" . meow-end-of-thing)
; '("/" . meow-visit)
; '("a" . meow-append)
; '("A" . meow-open-below)
; '("b" . meow-back-word)
; '("B" . meow-back-symbol)
; '("c" . meow-change)
; '("d" . meow-delete)
; '("e" . meow-prev)
; '("E" . meow-prev-expand)
; '("f" . meow-find)
; '("g" . meow-cancel-selection)
; '("G" . meow-grab)
; '("m" . meow-left)
; '("M" . meow-left-expand)
; '("i" . meow-right)
; '("I" . meow-right-expand)
; '("j" . meow-join)
; '("k" . meow-kill)
; '("l" . meow-line)
; '("L" . meow-goto-line)
; '("h" . meow-mark-word)
; '("H" . meow-mark-symbol)
; '("n" . meow-next)
; '("N" . meow-next-expand)
; '("o" . meow-block)
; '("O" . meow-to-block)
; '("p" . meow-yank)
; '("q" . meow-quit)
; '("r" . meow-replace)
; '("s" . meow-insert)
; '("S" . meow-open-above)
; '("t" . meow-till)
; '("u" . meow-undo)
; '("U" . meow-undo-in-selection)
; '("v" . meow-search)
; '("w" . meow-next-word)
; '("W" . meow-next-symbol)
; '("x" . meow-delete)
; '("X" . meow-backward-delete)
; '("y" . meow-save)
; '("z" . meow-pop-selection)
; '("'" . repeat)
; '("<escape>" . ignore)))
;
; (require 'meow)
; (meow-setup)
; (meow-global-mode 1)
#+end_src
* Evil
#+begin_src emacs-lisp
(use-package evil
:ensure t
:config
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(evil-mode 1))
(use-package undo-tree
:ensure t
:after evil
@ -1034,14 +905,11 @@ Uses the external fish program to provide fish-style completions to eshell etc
:config
(evil-set-undo-system 'undo-tree)
(global-undo-tree-mode 1))
(use-package evil-org
:ensure t
:after org
:hook (org-mode . (lambda () evil-org-mode))
;; :config
;; (require 'evil-org-agenda)
;; (evil-org-agenda-set-keys)
)
:hook (org-mode . (lambda () evil-org-mode)))
(use-package evil-collection
:after evil
@ -1075,7 +943,7 @@ Uses the external fish program to provide fish-style completions to eshell etc
("ADHD 1" . "https://www.youtube.com/watch?v=CmMrm4BpQHU")
("WREK FM" . "http://streaming.wrek.org:8000/wrek_live-128kb.m3u")
))
;; Todo: lainchan? adhd music stream from youtube? wuog? wrekFM? does freeside have streaming radio?
(with-eval-after-load 'embark (empv-embark-initialize-extra-actions))
(add-to-list 'empv-mpv-args "--ytdl-format=best")
(add-to-list 'empv-mpv-args "--save-position-on-quit")
@ -1090,6 +958,8 @@ Uses the external fish program to provide fish-style completions to eshell etc
- Refactor to use use-package more effectively
- Use :mode and :config like [[https://ianyepan.github.io/posts/setting-up-use-package/][here]]
- Set things which should be set before package install in :init
- Disable source editing issue
- Goes away when I run =(defun org-edit-src-code nil)=
** Terminals
- More terminals
@ -1153,8 +1023,6 @@ Uses the external fish program to provide fish-style completions to eshell etc
- empv-video-dir empv-audio-dir?
- empv-play-file
selected radio (See empv-radio-log-file and empv-radio-log-format
variables and their documentations).