From ad89dd2004432d5696119e551e09bff2a963554a Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Sun, 13 Oct 2024 13:35:01 +0900 Subject: [PATCH] [hs-mode] udpate key bind to use hs level --- non-sudoer/emacs.el | 1 + roles/emacs/doom/config/config.el | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/non-sudoer/emacs.el b/non-sudoer/emacs.el index 2fea204..32d7e94 100644 --- a/non-sudoer/emacs.el +++ b/non-sudoer/emacs.el @@ -138,3 +138,4 @@ (global-set-key (kbd "C-c C-f C-u") 'hs-show-block) (global-set-key (kbd "C-c C-f C-a C-f") 'hs-hide-all) (global-set-key (kbd "C-c C-f C-a C-u") 'hs-show-all) +(global-set-key (kbd "C-c C-l") 'hs-hide-level) diff --git a/roles/emacs/doom/config/config.el b/roles/emacs/doom/config/config.el index a4dac25..6fd9be0 100644 --- a/roles/emacs/doom/config/config.el +++ b/roles/emacs/doom/config/config.el @@ -91,7 +91,7 @@ (setq doom-modeline-vcs-max-length 12) (setq doom-modeline-github t) (setq doom-modeline-github-interval (* 30 60)) - (setq doom-modeline-checker-simple-format t)) + (setq doom-modeline-check-simple-format t)) ;; Key bindings (map! "\C-h" 'backward-delete-char) @@ -225,3 +225,11 @@ (add-to-list 'auto-mode-alist '("\\.action\\'" . gdb-script-mode)) (font-lock-add-keywords 'gdb-script-mode '(("\\<\\(bool\\|byte\\|int8\\|uint8\\|int16\\|uint16\\|int32\\|uint32\\|int64\\|uint64\\|float32\\|float64\\|string\\|time\\|duration\\)\\>" . font-lock-builtin-face)) 'set) + +;; fold: use hs-minor-mode instead of vimish +(after! vimish-fold + (remove-hook 'prog-mode-hook #'vimish-fold-mode)) +(add-hook 'prog-mode-hook #'hs-minor-mode) +(use-package! hideshow + :bind + (("C-c C-l" . hs-hide-level)))