feat(emacs): Misc. tooling

This commit is contained in:
Madeleine Sydney
2025-03-04 03:10:59 -07:00
parent 7edba3e295
commit 3e5020fb09
3 changed files with 14 additions and 3 deletions

View File

@@ -129,6 +129,10 @@
:prefix-map 'syd-leader-insert-map
"u" #'insert-char)
;; Code
(general-def
:prefix-map 'syd-leader-code-map)
;; Leader
(general-def
:keymaps 'syd-leader-map
@@ -145,6 +149,7 @@
"h" `("Help" . ,help-map)
"n" `("Notes" . ,syd-leader-notes-map)
"i" `("Insert" . ,syd-leader-insert-map)
"c" `("Code" . ,syd-leader-code-map)
"," `("Switch buffer in project" . ,#'consult-project-buffer)
"<" `("Switch buffer" . ,#'consult-buffer)
"/" `("Search project" . ,#'syd-project-search)))

View File

@@ -30,6 +30,8 @@
(use-package projection
;; Enable the `projection-hook' feature.
:hook (after-init . global-projection-hook-mode)
:general (:keymaps 'syd-leader-project-map
"R" #'projection-commands-run-project)
;; Require projections immediately after project.el.
:config
(with-eval-after-load 'project
@@ -38,7 +40,9 @@
;; Allow interactively selecting available compilation targets from the
;; current project type.
(use-package projection-multi
:after projection)
:after projection
:general (:keymaps 'syd-leader-project-map
"M" #'projection-multi-projection))
;; Embark integration for projection-multi.
(use-package projection-multi-embark

View File

@@ -5,7 +5,7 @@
(when-let* ((buf (get-buffer "*lsp-help*")))
(kill-buffer buf))
(call-interactively #'lsp-describe-thing-at-point)
(let ((buf (get-buffer "*lsp-help*")))
(when-let* ((buf (get-buffer "*lsp-help*")))
(when (get-buffer-window-list buf)
;; Bury the buffer so the popup system has full control over how it's
;; selected.
@@ -30,6 +30,8 @@
(setq lsp-headerline-breadcrumb-enable nil)
:hook (lsp-mode . lsp-enable-which-key-integration)
:commands lsp
:general (:keymaps 'syd-leader-code-map
"a" #'lsp-execute-code-action)
:config
(syd-defadvice syd-lsp-install-server-a ()
"Override and disbale `lsp-install-server'"
@@ -40,7 +42,7 @@
:size 13 :quit t :select nil)
;; DEPRECATED: Remove once syd-strategies is working.
(syd-add-hook 'lsp-mode
(syd-add-hook 'lsp-mode-hook
(defun syd-lsp-set-handlers-h ()
(setq-local syd-lookup-documentation-handlers
(list #'syd-lsp-lookup-documentation)))))