diff options
author | Alan Pearce | 2023-03-23 16:54:50 +0100 |
---|---|---|
committer | Alan Pearce | 2023-03-23 16:54:50 +0100 |
commit | 8640a2c397c0d6dcc1b4440a124d596434f84d05 (patch) | |
tree | 920e775baba55d68a7bfb73904854d926972b7b2 /user/emacs | |
parent | 21729d21ff2678b83984ee1a4e600c6e88cef2ce (diff) | |
download | nixfiles-8640a2c397c0d6dcc1b4440a124d596434f84d05.tar.lz nixfiles-8640a2c397c0d6dcc1b4440a124d596434f84d05.tar.zst nixfiles-8640a2c397c0d6dcc1b4440a124d596434f84d05.zip |
emacs: simplify minibuffer completion using only built-in packages
Diffstat (limited to 'user/emacs')
-rw-r--r-- | user/emacs/init.el | 58 |
1 files changed, 20 insertions, 38 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index a6677698..2c315f87 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -228,12 +228,15 @@ With two prefix arguments, write out the day and month name." (use-package hydra :defer 2) -(use-package ivy - :defer 1 - :config (progn - (ivy-mode +1))) -(use-package ivy-hydra - :defer 2) + +(fido-vertical-mode +1) + +(setq completion-ignore-case t + read-buffer-completion-ignore-case t + read-file-name-completion-ignore-case t + completion-styles '(flex substring basic) + completion-category-defaults nil + completion-category-overrides '((file (styles basic partial-completion)))) (use-package smerge-mode :after magit @@ -280,12 +283,6 @@ _p_rev _u_pper _=_: upper/lower _r_esolve :config (progn (setq ivy-count-format "%d/%d "))) -(use-package amx - :config (setq amx-history-length 100)) - -(use-package counsel - :commands (counsel-unicode-char) - :general ("M-x" #'counsel-M-x)) ;;; Windows @@ -463,13 +460,15 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (use-package projectile :defer 1 :defines projectile-command-map + :general (:keymaps 'projectile-command-map + "s s" #'projectile-ripgrep + "s r" #'projectile-ripgrep) :config (progn (add-to-list 'projectile-globally-ignored-files "package-lock.json") (add-to-list 'projectile-globally-ignored-files "pnpm-lock.yaml") (add-to-list 'projectile-project-root-files "package.json") (add-to-list 'projectile-project-root-files-bottom-up "pnpm-workspace.yaml") - (setq projectile-completion-system 'ivy - projectile-kill-buffers-filter 'kill-only-files + (setq projectile-kill-buffers-filter 'kill-only-files projectile-sort-order 'modification-time projectile-project-root-functions '(projectile-root-local projectile-root-top-down @@ -479,24 +478,9 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (with-eval-after-load 'evil-ex (evil-ex-define-cmd "rg" #'ripgrep-regexp) (evil-ex-define-cmd "prg" #'projectile-ripgrep) - (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell)))) - -(use-package counsel-projectile - :defer 1 - :commands (counsel-projectile-switch-project - counsel-projectile-rg - counsel-projectile-switch-to-buffer - counsel-projectile-mode) - :general (:keymaps 'projectile-command-map - "s s" #'counsel-projectile-rg - "s r" #'counsel-projectile-rg) - :config (progn - (assq-delete-all #'projectile-ripgrep counsel-projectile-key-bindings) - (counsel-projectile-mode +1) - (with-eval-after-load 'evil-ex - (evil-ex-define-cmd "cprg" #'counsel-projectile-rg) - (evil-ex-define-cmd "pb" #'counsel-projectile-switch-to-buffer) - (evil-ex-define-cmd "psw[itch]" #'counsel-projectile-switch-project)))) + (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell) + (evil-ex-define-cmd "pb" #'projectile-switch-to-buffer) + (evil-ex-define-cmd "psw[itch]" #'projectile-switch-project)))) (use-package magit :commands (magit-status magit-dispatch) @@ -506,8 +490,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (magit-auto-revert-mode -1) (setq magit-section-visibility-indicator nil magit-diff-refine-hunk 'all - magit-display-buffer-function #'display-buffer - magit-completing-read-function #'ivy-completing-read) + magit-display-buffer-function #'display-buffer) (remove-hook 'magit-status-sections-hook 'magit-insert-tags-header) (remove-hook 'magit-section-highlight-hook 'magit-section-highlight) (remove-hook 'magit-section-highlight-hook 'magit-section-highlight-selection) @@ -1119,7 +1102,6 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (evil-ex-define-cmd "mu[4e]" #'mu4e))) :config (progn (setq mail-user-agent #'mu4e-user-agent - mu4e-completing-read-function #'ivy-completing-read mu4e-maildir "~/mail" mu4e-context-policy 'pick-first mu4e-update-interval 600 @@ -1162,8 +1144,8 @@ _p_rev _u_pper _=_: upper/lower _r_esolve "v" #'split-window-right "o" #'other-window "u" #'universal-argument - ";" #'counsel-M-x - "bb" #'counsel-switch-buffer + ";" #'execute-extended-command + "bb" #'switch-to-buffer "bx" #'kill-this-buffer "br" #'revert-buffer "bk" #'kill-buffer @@ -1185,7 +1167,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve "gl" #'magit-log-buffer-file "bi" #'ibuffer "bz" #'bury-buffer - "iu" #'counsel-unicode-char + "iu" #'insert-char "xe" #'eval-last-sexp) (load (expand-file-name "mail.el" user-emacs-directory) :noerror :nomessage) |