mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +01:00
replaced smex+ido with modern ui's
- vertico - orderless - marginalia +added embark
This commit is contained in:
3
TODO.md
3
TODO.md
@@ -1,3 +1,6 @@
|
|||||||
- replace smex with https://github.com/DarwinAwardWinner/amx
|
- replace smex with https://github.com/DarwinAwardWinner/amx
|
||||||
- try to marry amx and marginalia somehow
|
- try to marry amx and marginalia somehow
|
||||||
- try https://github.com/oantolin/embark
|
- try https://github.com/oantolin/embark
|
||||||
|
- check out other vertico extensions
|
||||||
|
- play with embark: https://karthinks.com/software/fifteen-ways-to-use-embark/
|
||||||
|
- FIXME: orglist mode: not more able to jump word wise with M-<left|right>
|
||||||
|
|||||||
6
init.el
6
init.el
@@ -152,13 +152,13 @@
|
|||||||
(require 'init-windowmgmt)
|
(require 'init-windowmgmt)
|
||||||
(require 'init-workspaces)
|
(require 'init-workspaces)
|
||||||
(require 'init-indentation)
|
(require 'init-indentation)
|
||||||
(require 'init-completion)
|
|
||||||
(require 'init-recentfiles)
|
(require 'init-recentfiles)
|
||||||
(require 'init-ibuffer)
|
(require 'init-ibuffer)
|
||||||
(require 'init-printing)
|
(require 'init-printing)
|
||||||
|
|
||||||
;; doesn't work with smex, only after <tab><tab> and shows in another buffer
|
;; (require 'init-completion)
|
||||||
;; (require 'init-marginalia)
|
(require 'init-smarter-than-emacs)
|
||||||
|
(require 'init-marginalia)
|
||||||
(require 'init-ui)
|
(require 'init-ui)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
98
lisp/init-smarter-than-emacs.el
Normal file
98
lisp/init-smarter-than-emacs.el
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
;;; *** Smarter M-x Mode (smex)
|
||||||
|
|
||||||
|
;; This is really cool and I don't know how I could ever live without it.
|
||||||
|
;; (use-package smex
|
||||||
|
;; :config
|
||||||
|
;; (smex-initialize)
|
||||||
|
;; (global-set-key (kbd "M-x") 'smex)
|
||||||
|
;; (global-set-key (kbd "M-X") 'smex-major-mode-commands))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package vertico
|
||||||
|
:init
|
||||||
|
(vertico-mode)
|
||||||
|
(require 'vertico-directory)
|
||||||
|
|
||||||
|
;; Different scroll margin
|
||||||
|
;; (setq vertico-scroll-margin 0)
|
||||||
|
|
||||||
|
;; Show more candidates
|
||||||
|
;; (setq vertico-count 20)
|
||||||
|
|
||||||
|
;; Grow and shrink the Vertico minibuffer
|
||||||
|
;; (setq vertico-resize t)
|
||||||
|
|
||||||
|
;; Optionally enable cycling for `vertico-next' and `vertico-previous'.
|
||||||
|
;; (setq vertico-cycle t)
|
||||||
|
|
||||||
|
:config
|
||||||
|
|
||||||
|
(defun tvd-vertico-jump-home()
|
||||||
|
"quickly go to home via ~ in minibuffer find-file
|
||||||
|
via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]"
|
||||||
|
(interactive)
|
||||||
|
(if (looking-back "/")
|
||||||
|
(progn
|
||||||
|
(backward-kill-sentence)
|
||||||
|
(insert "~/"))
|
||||||
|
(call-interactively 'self-insert-command)))
|
||||||
|
|
||||||
|
:bind (:map vertico-map
|
||||||
|
("~" . tvd-vertico-jump-home)
|
||||||
|
("RET" . #'vertico-directory-enter)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(use-package embark
|
||||||
|
:ensure t
|
||||||
|
|
||||||
|
:bind
|
||||||
|
(("C-." . embark-act) ;; pick some comfortable binding
|
||||||
|
("C-," . embark-dwim) ;; good alternative: M-.
|
||||||
|
) ;; alternative for `describe-bindings'
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
;; Optionally replace the key help with a completing-read interface
|
||||||
|
(setq prefix-help-command #'embark-prefix-help-command)
|
||||||
|
|
||||||
|
;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
|
||||||
|
;; strategy, if you want to see the documentation from multiple providers.
|
||||||
|
(add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
|
||||||
|
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
||||||
|
|
||||||
|
:config
|
||||||
|
|
||||||
|
;; Hide the mode line of the Embark live/completions buffers
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||||
|
nil
|
||||||
|
(window-parameters (mode-line-format . none)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;; *** Smarter Search
|
||||||
|
|
||||||
|
;; test, replace isearch-forward-regexp first only.
|
||||||
|
;; dir: ivy/
|
||||||
|
(use-package swiper
|
||||||
|
:config
|
||||||
|
(setq ivy-wrap t)
|
||||||
|
(global-set-key "\C-s" 'swiper))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package orderless
|
||||||
|
:init
|
||||||
|
;; Configure a custom style dispatcher (see the Consult wiki)
|
||||||
|
;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch)
|
||||||
|
;; orderless-component-separator #'orderless-escapable-split-on-space)
|
||||||
|
(setq completion-styles '(orderless basic)
|
||||||
|
completion-category-defaults nil
|
||||||
|
completion-category-overrides '((file (styles partial-completion))))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'init-smarter-than-emacs)
|
||||||
|
;;; init-smarter-than-emacs ends here
|
||||||
@@ -29,26 +29,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; *** Smarter M-x Mode (smex)
|
|
||||||
|
|
||||||
;; This is really cool and I don't know how I could ever live without it.
|
|
||||||
(use-package smex
|
|
||||||
:config
|
|
||||||
(smex-initialize)
|
|
||||||
(global-set-key (kbd "M-x") 'smex)
|
|
||||||
(global-set-key (kbd "M-X") 'smex-major-mode-commands))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; *** Smarter Search
|
|
||||||
|
|
||||||
;; test, replace isearch-forward-regexp first only.
|
|
||||||
;; dir: ivy/
|
|
||||||
(use-package swiper
|
|
||||||
:config
|
|
||||||
(setq ivy-wrap t)
|
|
||||||
(global-set-key "\C-s" 'swiper))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; *** Which Func
|
;;; *** Which Func
|
||||||
|
|||||||
Reference in New Issue
Block a user