feat(emacs): Keybinds all around!

This commit is contained in:
Madeleine Sydney
2025-03-10 15:16:47 -06:00
parent 46b0844bd9
commit 61c3b13023
4 changed files with 43 additions and 12 deletions

View File

@@ -41,10 +41,14 @@
"c" #'haskell-cabal-visit-file
"h s" #'haskell-hoogle-start-server
"h q" #'haskell-hoogle-kill-server)
(general-def :keymaps 'interactive-haskell-mode-map
(:keymaps 'interactive-haskell-mode-map
:states '(normal insert)
"C-j" #'haskell-interactive-mode-history-next
"C-k" #'haskell-interactive-mode-history-previous)
(:keymaps 'haskell-mode-map
:states 'normal
[remap evil-open-above] #'syd-haskell-evil-open-above
[remap evil-open-below] #'syd-haskell-evil-open-below)
:config
(set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode)
#'syd-haskell-open-repl

View File

@@ -354,8 +354,12 @@ interactive call to `eval-expression' is stored.")
(use-package evil-leap
:hook (on-first-input . evil-leap-mode)
:straight (:type git
:host gitlab
:repo "msyds/evil-leap"))
:load-path "/home/crumb/src/evil-leap"
:straight nil
;; :straight (:type git
;; :host gitlab
;; :repo "msyds/evil-leap")
:config
(evil-leap-install-default-keybindings))
(provide 'syd-evil)

View File

@@ -184,7 +184,13 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
"k" #'org-babel-remove-result
"l" `("Links" . ,syd-org-mode-links-map)
"t" #'org-todo
"L" #'org-latex-preview)
"L" #'org-latex-preview
"s t" #'org-set-tags-command
"s p" #'org-set-property
"s d" #'org-deadline
"s s" #'org-schedule
"d t" #'org-timestamp
"d T" #'org-timestamp-inactive)
(general-define-key
:keymaps 'org-agenda-mode-map
:states '(normal visual motion emacs insert)
@@ -287,6 +293,11 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
{ max-height: 100%
; max-width: 100%
}
.figure img
{ max-height: 100%
; max-width: 100%
}
</style>"
"A default style for Org HTML exports.")
@@ -319,6 +330,8 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
(0.0 . org-upcoming-distant-deadline)))
(org-agenda-window-setup 'current-window)
(org-refile-use-outline-path t)
(org-tag-persistent-alist `(("orgmode" . ?o)
("hrt" . ?h)))
(org-agenda-skip-unavailable-files t)
;; Shift the agenda to show the previous 3 days and the next 7 days
;; for better context on your week. The past is less important than
@@ -409,7 +422,9 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
;; available even outside of Org-mode.
(general-def
:prefix-map 'syd-leader-notes-roam-map
"f" #'org-roam-node-find)
"f" #'org-roam-node-find
"d t" #'org-roam-dailies-capture-today
"d T" #'org-roam-dailies-goto-today)
(general-def
:keymaps 'syd-leader-open-map
@@ -440,10 +455,11 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
(use-package org-roam
:hook (org-load . syd-org-init-roam-h)
:commands (org-roam-buffer-toggle-display
org-roam-dailies-find-date
org-roam-dailies-find-today
org-roam-dailies-find-tomorrow
org-roam-dailies-find-yesterday)
org-roam-dailies-capture-today
org-roam-dailies-goto-date
org-roam-dailies-goto-today
org-roam-dailies-goto-tomorrow
org-roam-dailies-goto-yesterday)
:init (progn (syd-org--init-roam-keybinds)
(syd-load-packages-incrementally
'(ansi-color dash f rx seq magit-section emacsql)))
@@ -453,7 +469,11 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html."
;; Make org-roam buffer sticky; i.e. don't replace it when opening a
;; file with an *-other-window command.
(org-roam-buffer-window-parameters '((no-delete-other-windows . t)))
(org-roam-completion-everywhere t))
(org-roam-completion-everywhere t)
(org-roam-dailies-capture-templates
`(("d" "default" entry "* %?\n%U"
:target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>")
:empty-lines 1))))
:config
(defun syd-org-init-roam-h ()
"Setup `org-roam' but don't immediately initialize its database. Instead,

View File

@@ -31,7 +31,10 @@
:hook (lsp-mode . lsp-enable-which-key-integration)
:commands lsp
:general (:keymaps 'syd-leader-code-map
"a" #'lsp-execute-code-action)
"a" #'lsp-execute-code-action
"r" #'lsp-rename)
:custom (; Fixes type error when using rename.
(lsp-rename-use-prepare nil))
:config
(syd-defadvice syd-lsp-install-server-a ()
"Override and disbale `lsp-install-server'"