Compare commits
4 commits
ee8fef3d1e
...
e6617a7b33
Author | SHA1 | Date | |
---|---|---|---|
e6617a7b33 | |||
a157d0b927 | |||
e54698d048 | |||
fa7024e33d |
2 changed files with 144 additions and 28 deletions
170
config.org
170
config.org
|
@ -258,6 +258,15 @@ Show filesize human readable.
|
|||
(setq-default dired-listing-switches "-alh")
|
||||
#+end_src
|
||||
|
||||
** M-x customizations
|
||||
|
||||
Hide commands in M-x which do not work in the current mode.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq read-extended-command-predicate
|
||||
#'command-completion-default-include-p)
|
||||
#+end_src
|
||||
|
||||
* Package configuration
|
||||
** General configuration
|
||||
|
||||
|
@ -425,6 +434,7 @@ Source: [[https://github.com/greduan/emacs-theme-gruvbox][Github: greduan/emacs-
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package gruvbox-theme
|
||||
:disabled t
|
||||
:config
|
||||
(load-theme 'gruvbox-light-hard t))
|
||||
#+end_src
|
||||
|
@ -462,11 +472,9 @@ Installing and enabling ef-themes.
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ef-themes
|
||||
:disabled t
|
||||
:init
|
||||
(setq ef-themes-to-toggle '(ef-light ef-dark))
|
||||
(setq ef-themes-mixed-fonts t
|
||||
ef-themes-variable-pitch-ui t)
|
||||
(setq ef-themes-mixed-fonts t)
|
||||
(setq ef-themes-headings
|
||||
'((0 . (variable-pitch light 1.9))
|
||||
(1 . (variable-pitch light 1.8))
|
||||
|
@ -496,8 +504,8 @@ Add a slight transparency to the frames. Code provided by David Wilson / System
|
|||
During the last weeks I got used to using a light theme during daytime and a dark theme during nighttime. Luckily the themes based on Atom One are to my liking and the doom package provides a dark and light variant. One thing that was difficult with Emacs was actually switching theme since it involved disabling all current ones (for some reason on one machine there are two enabled while on the other machine its only one) and then loading the correct one. These functions try to make that process easier, at least for now. The long-term goal is to automatically change the theme based on the current system-wide setting.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq mmk2410/theme-night 'gruvbox-dark-hard)
|
||||
(setq mmk2410/theme-day 'gruvbox-light-hard)
|
||||
(setq mmk2410/theme-night 'ef-dark)
|
||||
(setq mmk2410/theme-day 'ef-light)
|
||||
|
||||
(defun mmk2410/switch-theme (theme)
|
||||
(mapcar 'disable-theme custom-enabled-themes)
|
||||
|
@ -529,6 +537,7 @@ I'm currently trying doom-modeline instead of telephone-line.
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package doom-modeline
|
||||
:disabled t
|
||||
:init (doom-modeline-mode 1)
|
||||
:config (setq doom-modeline-icon t))
|
||||
#+end_src
|
||||
|
@ -771,38 +780,145 @@ Source: [[https://github.com/Alexander-Miller/treemacs][Alexander-Miller/treemac
|
|||
:after (treemacs evil))
|
||||
#+end_src
|
||||
|
||||
** counsel, ivy and swiper
|
||||
** vertico
|
||||
|
||||
Emacs package collection (ivy, swiper and counsel) of flexible, simple tools for minibuffer completion.
|
||||
Vertico is a minimal completion UI that uses core Emacs functionality whenever possible.
|
||||
|
||||
Source: [[https://github.com/abo-abo/swiper][GitHub: abo-abo/swiper]]
|
||||
[[https://github.com/minad/vertico][GitHub: minad/vertico]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel
|
||||
:bind ("M-x" . counsel-M-x))
|
||||
|
||||
(use-package ivy
|
||||
:after (counsel)
|
||||
:diminish (ivy-mode)
|
||||
:config
|
||||
(ivy-mode t)
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
:bind
|
||||
(("C-c g" . counsel-git)
|
||||
("C-s" . swiper)
|
||||
("C-r" . swiper)))
|
||||
(use-package vertico
|
||||
:init
|
||||
(vertico-mode)
|
||||
(setq vertico-scroll-margin 0)
|
||||
(setq vertico-resize t)
|
||||
(setq vertico-cycle t))
|
||||
#+end_src
|
||||
|
||||
** ivy-rich
|
||||
** orderless
|
||||
|
||||
ivy-rich enhances M-x and similar even more by giving more information directly in the minibuffer.
|
||||
Emacs completion style that matches multiple regexps in any order
|
||||
|
||||
Source: [[https://github.com/Yevgnen/ivy-rich][GitHub: Yevgnen/ivy-rich]]
|
||||
[[https://github.com/oantolin/orderless][GitHub: oantolin/orderless]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy-rich
|
||||
:init (ivy-rich-mode 1))
|
||||
(use-package orderless
|
||||
:ensure t
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
(completion-category-overrides '((file (styles basic partial-completion)))))
|
||||
#+end_src
|
||||
|
||||
** marginalia
|
||||
|
||||
Marginalia in the minibuffer.
|
||||
|
||||
[[https://github.com/minad/marginalia][GitHub: minad/marginalia]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package marginalia
|
||||
:init
|
||||
(marginalia-mode)
|
||||
:bind (:map minibuffer-local-map
|
||||
("M-A" . marginalia-cycle)))
|
||||
#+end_src
|
||||
|
||||
** consult
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package consult
|
||||
;; Replace bindings. Lazily loaded due by `use-package'.
|
||||
:bind (;; C-c bindings (mode-specific-map)
|
||||
("C-c h" . consult-history)
|
||||
("C-c m" . consult-mode-command)
|
||||
("C-c k" . consult-kmacro)
|
||||
;; C-x bindings (ctl-x-map)
|
||||
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
|
||||
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
|
||||
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
|
||||
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
|
||||
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
|
||||
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
||||
;; Custom M-# bindings for fast register access
|
||||
("M-#" . consult-register-load)
|
||||
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
||||
("C-M-#" . consult-register)
|
||||
;; Other custom bindings
|
||||
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
||||
;; M-g bindings (goto-map)
|
||||
("M-g e" . consult-compile-error)
|
||||
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
||||
("M-g g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g o" . consult-outline) ;; Alternative: consult-org-heading
|
||||
("M-g m" . consult-mark)
|
||||
("M-g k" . consult-global-mark)
|
||||
("M-g i" . consult-imenu)
|
||||
("M-g I" . consult-imenu-multi)
|
||||
;; M-s bindings (search-map)
|
||||
("M-s d" . consult-find)
|
||||
("M-s D" . consult-locate)
|
||||
("M-s g" . consult-grep)
|
||||
("M-s G" . consult-git-grep)
|
||||
("M-s r" . consult-ripgrep)
|
||||
("M-s l" . consult-line)
|
||||
("M-s L" . consult-line-multi)
|
||||
("M-s m" . consult-multi-occur)
|
||||
("M-s k" . consult-keep-lines)
|
||||
("M-s u" . consult-focus-lines)
|
||||
;; Isearch integration
|
||||
("M-s e" . consult-isearch-history)
|
||||
:map isearch-mode-map
|
||||
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
|
||||
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
|
||||
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
|
||||
;; Minibuffer history
|
||||
:map minibuffer-local-map
|
||||
("M-s" . consult-history) ;; orig. next-matching-history-element
|
||||
("M-r" . consult-history)) ;; orig. previous-matching-history-element
|
||||
:hook (completion-list-mode . consult-preview-at-point-mode)
|
||||
:init
|
||||
(setq register-preview-delay 0.5
|
||||
register-preview-function #'consult-register-format)
|
||||
(advice-add #'register-preview :override #'consult-register-window)
|
||||
(setq xref-show-xrefs-function #'consult-xref
|
||||
xref-show-definitions-function #'consult-xref)
|
||||
:config
|
||||
(consult-customize
|
||||
consult-theme :preview-key '(:debounce 0.2 any)
|
||||
consult-ripgrep consult-git-grep consult-grep
|
||||
consult-bookmark consult-recent-file consult-xref
|
||||
consult--source-bookmark consult--source-file-register
|
||||
consult--source-recent-file consult--source-project-recent-file
|
||||
:preview-key '(:debounce 0.4 any))
|
||||
(setq consult-narrow-key "<"))
|
||||
#+end_src
|
||||
|
||||
** embark
|
||||
|
||||
Emacs Mini-Buffer Actions Rooted in Keymaps
|
||||
|
||||
[[https://github.com/oantolin/embark][GitHub: oantolin/embark]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package embark
|
||||
:bind
|
||||
(("C-." . embark-act) ;; pick some comfortable binding
|
||||
("C-;" . embark-dwim) ;; good alternative: M-.
|
||||
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
|
||||
|
||||
:init
|
||||
(setq prefix-help-command #'embark-prefix-help-command)
|
||||
:config
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||
nil
|
||||
(window-parameters (mode-line-format . none)))))
|
||||
|
||||
(use-package embark-consult
|
||||
:hook
|
||||
(embark-collect-mode . consult-preview-at-point-mode))
|
||||
#+end_src
|
||||
|
||||
** avy
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
(mmk2410/tab-bar-switch-or-create
|
||||
"Agenda"
|
||||
#'(lambda ()
|
||||
(org-agenda nil "c")
|
||||
(org-agenda nil "d")
|
||||
(sit-for 1)
|
||||
(split-window-horizontally)
|
||||
(other-window 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue