refactor: restructure Emacs config and add org journal features
- Add .gitignore for config management - Fix early-init compatibility for tool-bar-mode - Add org-journal, org-super-agenda, and org-ql support - Improve consult with cross-platform file search - Add embark-export keybinding
This commit is contained in:
@@ -45,7 +45,23 @@
|
||||
:init (marginalia-mode))
|
||||
|
||||
;; 安装consult,增强搜索和其他菜单
|
||||
(use-package consult)
|
||||
(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)))
|
||||
|
||||
(if *is-windows*
|
||||
(progn
|
||||
(setq consult-locate-args (encode-coding-string "es.exe -i -p -r" 'gbk))
|
||||
(add-to-list 'process-coding-system-alist '("es" gbk . gbk))))
|
||||
|
||||
(when *is-mac*
|
||||
(setopt consult-locate-args "mdfind -name")))
|
||||
|
||||
;; 安装embark,一个菜单,用用就明白了
|
||||
(use-package embark
|
||||
@@ -65,17 +81,6 @@
|
||||
'embark-collect-mode-hook
|
||||
#'consult-preview-at-point-mode))))
|
||||
|
||||
(define-key minibuffer-local-map (kbd "C-c C-e") 'embark-export)
|
||||
|
||||
(if *is-windows*
|
||||
(progn
|
||||
(setq consult-locate-args (encode-coding-string "es.exe -i -p -r" 'gbk))
|
||||
(add-to-list 'process-coding-system-alist '("es" gbk . gbk))))
|
||||
|
||||
(when *is-mac*
|
||||
(setopt consult-locate-args "mdfind -name"))
|
||||
|
||||
|
||||
;; 启用savehist,保存命令顺序
|
||||
(use-package savehist
|
||||
:hook (after-init . savehist-mode)
|
||||
|
||||
Reference in New Issue
Block a user