emacs: hide global minor mode lighters
This commit is contained in:
parent
988c47f430
commit
f8bf99b49a
1 changed files with 15 additions and 0 deletions
|
@ -28,6 +28,13 @@
|
|||
"Switch to a buffer visiting your init file."
|
||||
(interactive)
|
||||
(find-file user-init-file))
|
||||
(defvar hidden-minor-modes '()
|
||||
"Modes which lighters are hidden by `hide-minor-modes'.")
|
||||
(defun hide-minor-modes ()
|
||||
"Disable lighter for every mode in `hidden-minor-modes'."
|
||||
(dolist (mode hidden-minor-modes)
|
||||
(let ((lighter (cdr (assoc mode minor-mode-alist))))
|
||||
(when lighter (setcar lighter "")))))
|
||||
(defun reindent-buffer ()
|
||||
"Reindent the current buffer."
|
||||
(interactive)
|
||||
|
@ -52,6 +59,8 @@ value `italic'."
|
|||
(save-buffer)
|
||||
(kill-current-buffer))
|
||||
|
||||
(add-hook 'after-change-major-mode-hook #'hide-minor-modes)
|
||||
|
||||
;; other key binds
|
||||
(global-set-key (kbd "C-c e r") 'reindent-buffer)
|
||||
(global-set-key (kbd "C-c e i") 'edit-init-file)
|
||||
|
@ -130,14 +139,17 @@ value `italic'."
|
|||
;; undo-tree
|
||||
(package-install 'undo-tree)
|
||||
(global-undo-tree-mode)
|
||||
(add-to-list 'hidden-minor-modes 'undo-tree-mode)
|
||||
|
||||
;; isearch match count
|
||||
(package-install 'anzu)
|
||||
(global-anzu-mode)
|
||||
(add-to-list 'hidden-minor-modes 'anzu-mode)
|
||||
|
||||
;; highlight colours
|
||||
(package-install 'rainbow-mode)
|
||||
(add-hook 'prog-mode-hook 'rainbow-mode)
|
||||
(add-to-list 'hidden-minor-modes 'rainbow-mode)
|
||||
|
||||
;; rainbow parens in lisp-mode
|
||||
(package-install 'rainbow-delimiters)
|
||||
|
@ -170,6 +182,7 @@ value `italic'."
|
|||
(package-install 'company)
|
||||
(require 'company)
|
||||
(add-hook 'after-init-hook 'global-company-mode)
|
||||
(add-to-list 'hidden-minor-modes 'company-mode)
|
||||
(setq company-begin-commands '(self-insert-command)
|
||||
company-idle-delay .1
|
||||
company-minimum-prefix-length 2
|
||||
|
@ -194,10 +207,12 @@ value `italic'."
|
|||
;; editorconfig
|
||||
(package-install 'editorconfig)
|
||||
(editorconfig-mode)
|
||||
(add-to-list 'hidden-minor-modes 'editorconfig-mode)
|
||||
|
||||
;; which-key
|
||||
(package-install 'which-key)
|
||||
(which-key-mode)
|
||||
(add-to-list 'hidden-minor-modes 'which-key-mode)
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order 'which-key-key-order-alpha
|
||||
which-key-sort-uppercase-first nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue