Config: install denote and some extra packages, add plocate support on linux, optimize keybindings

This commit is contained in:
2026-05-09 01:00:46 +08:00
parent 1808941dcb
commit f419304684
9 changed files with 88 additions and 34 deletions

View File

@@ -57,13 +57,6 @@
(use-package consult
:config
(defun consult-fd-global ()
"Search for all files use fd"
(interactive)
(let ((consult-fd-args "fd -H -I -i -c never --full-path")
(default-directory "~/"))
(consult-fd)))
;; everything
(when *is-windows*
(setq consult-locate-args (encode-coding-string "es.exe -i -p -r" 'gbk))
@@ -74,12 +67,11 @@
;; mdfind
(when *is-mac*
(setopt consult-locate-args "mdfind -name")))
(setq consult-locate-args "mdfind -name"))
(use-package consult-notes
:config
(setq consult-notes-file-dir-sources '(("Org Notes" ?n "~/org/my-org-note/")
("Org Journal" ?j "~/org/my-org-daily/" :hidden t))))
;; plocate
(when *is-linux*
(setq consult-locate-args "plocate --basename --ignore-case")))
;; embark
(use-package embark
@@ -234,8 +226,8 @@ targets."
(use-package consult-flycheck)
;; vterm
(unless *is-windows*
(use-package vterm))
;; (unless *is-windows*
;; (use-package vterm))
;; eat
(use-package eat
@@ -257,6 +249,20 @@ targets."
;; general
(use-package general)
;; hydra
(use-package hydra
:defines (consult-imenu-config)
:init
(with-eval-after-load 'consult-imenu
(setq consult-imenu-config
'((emacs-lisp-mode :toplevel "Functions"
:types ((?f "Functions" font-lock-function-name-face)
(?h "Hydras" font-lock-constant-face)
(?m "Macros" font-lock-function-name-face)
(?p "Packages" font-lock-constant-face)
(?t "Types" font-lock-type-face)
(?v "Variables" font-lock-variable-name-face)))))))
;; perspective
(use-package perspective
:bind