Compare commits

...

6 Commits

Author SHA1 Message Date
be60ef18e1 Added org-social 2025-12-02 03:10:53 -06:00
Micheal Smith
d97bc43e9d Modified style settings. 2025-11-18 03:10:56 -06:00
6f1750f82e Switching to Cartograph-CF. 2025-11-07 21:11:51 -06:00
Micheal Smith
f5e15b2784 Added YASnippet support. 2025-11-06 22:28:38 -06:00
Micheal Smith
5651db78c0 Enabling flyspell-mode, and flyspell-prog-mode by default. 2025-11-01 08:53:13 -05:00
Micheal Smith
2a89e1ded3 Fixed missing hydra include. 2025-11-01 07:54:20 -05:00
7 changed files with 196 additions and 8 deletions

View File

@@ -103,9 +103,9 @@ loading as a blank slate with only the scratch buffer open.
(setq ring-bell-function #'ignore
inhibit-startup-screen t)
(push '(font . "Victor Mono-13") default-frame-alist)
(set-face-font 'default "Victor Mono-13")
(set-face-font 'variable-pitch "Victor Mono-13")
(push '(font . "Cartograph CF-11") default-frame-alist)
(set-face-font 'default "Cartograph CF-11")
(set-face-font 'variable-pitch "Cartograph CF-11")
(copy-face 'default 'fixed-pitch)
@@ -314,6 +314,9 @@ keep the loading order in mind when doing so.
(epa-file-enable)
(setq epg-pinentry-mode 'loopback)
(setq epa-file-encrypt-to '("xulfer@cheapbsd.net"))
:hook
(prog-mode-hook . flyspell-prog-mode)
(text-mode-hook . flyspell-mode)
:custom
(scroll-conservatively 101 "Scroll just enough to bring text into view")
(enable-recursive-minibuffers t "Allow minibuffer commands in minibuffer")
@@ -483,6 +486,18 @@ on a system by system basis.
;;;
#+end_src
For now I have org-social enabled by default. It looks promising and doesn't add
any substantial bloat so why not.
#+BEGIN_SRC emacs-lisp
(use-package org-social
:ensure t
:config
(setq org-social-file "~/repos/xulfer.srht.site/social.org"
org-social-relay "https://relay.org-social.org"
org-social-my-public-url "https://xulfer.srht.site/social.org"))
#+END_SRC
* Modal Editing
I like using =vi= inspired modal editing. For a while I tried project evil, but
@@ -671,6 +686,112 @@ looking for.
(embark-collect-mode . consult-preview-at-point-mode))
#+end_src
* Hail Hydra?!
I find that [[https://github.com/abo-abo/hydra][Hydra]] is great for providing visual menus for tasks that might
otherwise be fairly unwieldy. I use them hydra's for windows, tabs, and a
few other things in the future perhaps.
** Tabs
Pretty simple tab hydra. Handles opening, closing, and simple navigation.
#+name: tab-hydra
#+begin_src emacs-lisp :tangle no
(defhydra hydra-tab (:color red :hint nil)
"
Movement^^ ^Modifier^
----------------------------------------------------------------
_h_ ← _n_ ew
_l_ → _c_ lose
"
("h" tab-previous)
("l" tab-next)
("n" tab-new)
("c" tab-close)
("SPC" nil))
(global-set-key (kbd "C-c t") 'hydra-tab/body)
#+end_src
** Windows
Quite a helpful window hydra. I cannot take credit for this. I copied it
from somewhere. When I find the link I'll add it here.
#+name: window-hydra
#+begin_src emacs-lisp :tangle no
(defhydra hydra-window (:color red :hint nil)
"
Movement^^ ^Split^ ^Switch^ ^Resize^
----------------------------------------------------------------
_h_ ← _v_ertical _b_uffer _q_ X←
_j_ ↓ _x_ horizontal _f_ind files _w_ X↓
_k_ ↑ _z_ undo _a_ce 1 _e_ X↑
_l_ → _Z_ reset _s_wap _r_ X→
_F_ollow _D_lt Other _S_ave max_i_mize
_SPC_ cancel _o_nly this _d_elete
"
("h" windmove-left )
("j" windmove-down )
("k" windmove-up )
("l" windmove-right )
("q" hydra-move-splitter-left)
("w" hydra-move-splitter-down)
("e" hydra-move-splitter-up)
("r" hydra-move-splitter-right)
("b" consult-buffer)
("f" consult-fd)
("F" follow-mode)
("a" (lambda ()
(interactive)
(ace-window 1)
(add-hook 'ace-window-end-once-hook
'hydra-window/body))
)
("v" (lambda ()
(interactive)
(split-window-right)
(windmove-right))
)
("x" (lambda ()
(interactive)
(split-window-below)
(windmove-down))
)
("s" (lambda ()
(interactive)
(ace-window 4)
(add-hook 'ace-window-end-once-hook
'hydra-window/body)))
("S" save-buffer)
("d" delete-window)
("D" (lambda ()
(interactive)
(ace-window 16)
(add-hook 'ace-window-end-once-hook
'hydra-window/body))
)
("o" delete-other-windows)
("i" ace-maximize-window)
("z" (progn
(winner-undo)
(setq this-command 'winner-undo))
)
("Z" winner-redo)
("SPC" nil))
(global-set-key (kbd "C-c w") 'hydra-window/body)
#+end_src
** Pulling it all together
#+begin_src emacs-lisp
(use-package hydra
:demand t
:config
<<tab-hydra>>
<<window-hydra>>)
#+end_src
* Buferlo
The package itself sums it up best.
@@ -1326,7 +1447,7 @@ the future.
:files ("*.el"))
:no-require t
:init
(customize-set-variable 'frame-background-mode 'dark)
(customize-set-variable 'frame-background-mode 'light)
(load-theme 'solarized t))
#+end_src
@@ -1365,6 +1486,7 @@ forge support really.
#+begin_src emacs-lisp
(use-package magit
:defer t
:bind (("C-c M" . magit-dispatch))
:custom
(magit-repository-directories (list (cons elpaca-repos-directory 1)))
(magit-diff-refine-hunk 'all)
@@ -1619,6 +1741,30 @@ taking tool has.
org-roam-ui-open-on-start t))
#+end_src
* Snippets
Snippets can be helpful in many situations. However they can also get in the way.
This is my *attempt* at making them helpful in most cases.
** YASnippet
[[https://github.com/joaotavora/yasnippet?tab=readme-ov-file][YASnippet]] is a template system for Emacs. It allows you to type an abbreviation
and automatically expand it into function templates.
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:hook (prog-mode . yas-minor-mode))
#+END_SRC
For now I'm just using [[https://github.com/AndreaCrotti/yasnippet-snippets][YASnippet-snippets]] to provide all of my snippets. Custom
ones may be added in the future.
#+BEGIN_SRC emacs-lisp
(use-package yasnippet-snippets
:after (yasnippet)
:init (yas-reload-all))
#+END_SRC
* Optional Customizations
Some of these seem to work well on any system so far, but won't automatically

View File

@@ -103,9 +103,9 @@ loading as a blank slate with only the scratch buffer open.
(setq ring-bell-function #'ignore
inhibit-startup-screen t)
(push '(font . "Victor Mono-13") default-frame-alist)
(set-face-font 'default "Victor Mono-13")
(set-face-font 'variable-pitch "Victor Mono-13")
(push '(font . "Cartograph CF-11") default-frame-alist)
(set-face-font 'default "Cartograph CF-11")
(set-face-font 'variable-pitch "Cartograph CF-11")
(copy-face 'default 'fixed-pitch)
@@ -218,6 +218,8 @@ features.
#+INCLUDE: "config/qol.org" :minlevel 1
#+INCLUDE: "config/hydra.org" :minlevel 1
#+INCLUDE: "config/bufferlo.org" :minlevel 1
#+INCLUDE: "config/error.org" :minlevel 1
@@ -240,6 +242,8 @@ features.
#+INCLUDE: "config/org_mode.org" :minlevel 1
#+INCLUDE: "config/snippets.org" :minlevel 1
#+INCLUDE: "config/custom.org" :minlevel 1
#+begin_src emacs-lisp :exports none

View File

@@ -32,6 +32,9 @@ keep the loading order in mind when doing so.
(epa-file-enable)
(setq epg-pinentry-mode 'loopback)
(setq epa-file-encrypt-to '("xulfer@cheapbsd.net"))
:hook
(prog-mode-hook . flyspell-prog-mode)
(text-mode-hook . flyspell-mode)
:custom
(scroll-conservatively 101 "Scroll just enough to bring text into view")
(enable-recursive-minibuffers t "Allow minibuffer commands in minibuffer")

23
config/snippets.org Normal file
View File

@@ -0,0 +1,23 @@
* Snippets
Snippets can be helpful in many situations. However they can also get in the way.
This is my *attempt* at making them helpful in most cases.
** YASnippet
[[https://github.com/joaotavora/yasnippet?tab=readme-ov-file][YASnippet]] is a template system for Emacs. It allows you to type an abbreviation
and automatically expand it into function templates.
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:hook (prog-mode . yas-minor-mode))
#+END_SRC
For now I'm just using [[https://github.com/AndreaCrotti/yasnippet-snippets][YASnippet-snippets]] to provide all of my snippets. Custom
ones may be added in the future.
#+BEGIN_SRC emacs-lisp
(use-package yasnippet-snippets
:after (yasnippet)
:init (yas-reload-all))
#+END_SRC

View File

@@ -19,3 +19,14 @@ on a system by system basis.
;;;
#+end_src
For now I have org-social enabled by default. It looks promising and doesn't add
any substantial bloat so why not.
#+BEGIN_SRC emacs-lisp
(use-package org-social
:ensure t
:config
(setq org-social-file "~/repos/xulfer.srht.site/social.org"
org-social-relay "https://relay.org-social.org"
org-social-my-public-url "https://xulfer.srht.site/social.org"))
#+END_SRC

View File

@@ -16,7 +16,7 @@ the future.
:files ("*.el"))
:no-require t
:init
(customize-set-variable 'frame-background-mode 'dark)
(customize-set-variable 'frame-background-mode 'light)
(load-theme 'solarized t))
#+end_src

View File

@@ -7,6 +7,7 @@ forge support really.
#+begin_src emacs-lisp
(use-package magit
:defer t
:bind (("C-c M" . magit-dispatch))
:custom
(magit-repository-directories (list (cons elpaca-repos-directory 1)))
(magit-diff-refine-hunk 'all)