Config: add hs-minor-mode support
This commit is contained in:
@@ -40,10 +40,11 @@
|
||||
|
||||
;; delight
|
||||
(use-package delight
|
||||
:config
|
||||
:init
|
||||
(delight '((eldoc-mode nil eldoc)
|
||||
(org-indent-mode nil org)
|
||||
(desktop-environment-mode nil desktop-environment))))
|
||||
(desktop-environment-mode nil desktop-environment)
|
||||
(hs-minor-mode nil hideshow))))
|
||||
|
||||
;; 安装gcmh用于管理内存回收
|
||||
(use-package gcmh
|
||||
|
||||
@@ -158,6 +158,12 @@
|
||||
"C-," 'duplicate-and-move-to-next-line
|
||||
"C-c o l" 'denote-link)
|
||||
|
||||
;; hs-hide-mode
|
||||
(general-def hs-minor-mode-map
|
||||
"C-c h" 'hs-toggle-hiding
|
||||
"C-c H" 'hs-hide-all
|
||||
"C-c S" 'hs-show-all)
|
||||
|
||||
;; calendar
|
||||
(general-def calendar-mode-map
|
||||
"RET" 'denote-journal-calendar-find-file)
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
(electric-pair-default-inhibit char))))))
|
||||
|
||||
;; 预加载,防止windows的org-mode加载卡顿
|
||||
(if *is-windows*
|
||||
(progn (run-with-idle-timer
|
||||
0.5 nil
|
||||
(lambda ()
|
||||
(with-temp-buffer
|
||||
(org-mode)
|
||||
(org-mode))
|
||||
(message "Org preloaded")))))
|
||||
;; (if *is-windows*
|
||||
;; (progn (run-with-idle-timer
|
||||
;; 0.5 nil
|
||||
;; (lambda ()
|
||||
;; (with-temp-buffer
|
||||
;; (org-mode)
|
||||
;; (org-mode))
|
||||
;; (message "Org preloaded")))))
|
||||
|
||||
;; 设置标题字体大小
|
||||
;; (with-eval-after-load 'org
|
||||
@@ -51,7 +51,7 @@
|
||||
(cond
|
||||
(*is-windows*
|
||||
(setq org-agenda-files '("h:/emacs/hugo/this-is-my-blog/all-blog.org"
|
||||
"h:/emacs/my-org-daily/")))
|
||||
"h:/emacs/my-org-note/20260509T232442==agenda--all-my-todos__org.org")))
|
||||
(*is-mac*
|
||||
(setq org-agenda-files '("~/org/my-org-note/20260509T232442==agenda--all-my-todos__org.org")))
|
||||
(*is-linux*
|
||||
@@ -77,6 +77,8 @@
|
||||
(setq denote-directory "~/org/my-org-note/")
|
||||
(setq denote-prompts '(title signature keywords))
|
||||
(setq denote-title-history nil)
|
||||
(setq denote-signature-history
|
||||
'("note" "project" "fun" "wisdom" "article" "data" "metanote" "agenda"))
|
||||
(setq denote-known-keywords
|
||||
'("emacs" "org" "elisp" "scheme" "programming" "philosophy" "film" "linux" "computerstuff" "game" "masterpiece")))
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; hs-minor-mode
|
||||
(add-hook 'prog-mode-hook 'hs-minor-mode)
|
||||
|
||||
;; tree-sitter
|
||||
(use-package treesit-auto
|
||||
:config
|
||||
|
||||
@@ -97,6 +97,14 @@
|
||||
;; 移动到垃圾桶
|
||||
(setq delete-by-moving-to-trash t)
|
||||
|
||||
;; 让xref用rg
|
||||
(setq xref-search-program
|
||||
(cond
|
||||
((or (executable-find "ripgrep")
|
||||
(executable-find "rg"))
|
||||
'ripgrep)
|
||||
(t 'grep)))
|
||||
|
||||
(provide 'init-startup)
|
||||
|
||||
;;; init-startup.el ends here
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
;; org-mode美化
|
||||
(use-package olivetti
|
||||
:config
|
||||
:init
|
||||
(add-hook 'olivetti-mode-hook
|
||||
(lambda ()
|
||||
(display-line-numbers-mode -1)))
|
||||
|
||||
Reference in New Issue
Block a user