feat(editor): replace ido and amx with selectrum, prescient and marginalia

This commit is contained in:
2021-06-17 20:10:28 +01:00
parent 27c492b427
commit 93c22e1bb9
14 changed files with 79 additions and 42 deletions

View File

@@ -1,17 +0,0 @@
;;; siren-prescient.el --- jimeh's Emacs Siren: prescient configuration.
;;; Commentary:
;; Basic configuration for prescient.
;;; Code:
(use-package prescient
:defer t
:custom
(prescient-filter-method '(literal regexp initialism fuzzy))
(prescient-save-file (expand-file-name "prescient-save.el" siren-cache-dir)))
(provide 'siren-prescient)
;;; siren-prescient.el ends here

View File

@@ -6,6 +6,9 @@
;;; Code:
;; Enable alternative to M-x.
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
;; Enable dabbrev-expand via custom keybinding.
(global-set-key (kbd "C-x M-/") 'dabbrev-expand)

View File

@@ -16,7 +16,7 @@
(ido-default-file-method 'selected-window)
(ido-enable-flex-matching t)
(ido-enable-prefix nil)
(ido-max-prospects 10)
(ido-max-prospects 12)
(ido-save-directory-list-file (expand-file-name "ido.hist" siren-cache-dir))
(ido-use-faces t)
(ido-use-filename-at-point nil)

View File

@@ -0,0 +1,16 @@
;;; siren-marginalia.el --- jimeh's Emacs Siren: marginalia configuration.
;;; Commentary:
;; Basic configuration for marginalia.
;;; Code:
(use-package marginalia
:bind (:map minibuffer-local-map
("M-A" . marginalia-cycle))
:init
(marginalia-mode +1))
(provide 'siren-marginalia)
;;; siren-marginalia.el ends here

View File

@@ -0,0 +1,31 @@
;;; siren-prescient.el --- jimeh's Emacs Siren: prescient configuration.
;;; Commentary:
;; Basic configuration for prescient.
;;; Code:
(use-package prescient
:defer t
:custom
(prescient-filter-method '(literal-prefix literal regexp initialism fuzzy))
(prescient-history-length 100)
(prescient-save-file (expand-file-name "prescient-save.el" siren-cache-dir))
(prescient-sort-full-matches-first t)
(prescient-sort-length-enable nil)
:config
(prescient-persist-mode +1))
(use-package company-prescient
:defer t
:after (prescient company)
:config
(company-prescient-mode +1))
(provide 'siren-prescient)
;;; siren-prescient.el ends here

View File

@@ -9,14 +9,15 @@
(require 'siren-prescient)
(use-package selectrum
:straight (:host github :repo "raxod502/selectrum")
:custom
(selectrum-display-action nil)
(selectrum-fix-vertical-window-height t)
(selectrum-max-window-height 12)
:config
(selectrum-mode +1))
(use-package selectrum-prescient
:straight (:host github :repo "raxod502/prescient.el"
:files ("selectrum-prescient.el"))
:after (selectrum)
:config

View File

@@ -11,7 +11,6 @@
(prog-mode . flycheck-mode)
:custom
(flycheck-completion-system 'ido)
(flycheck-idle-change-delay 1.0)
(flycheck-indication-mode 'right-fringe)
(flycheck-ruby-rubocop-executable "rubocop-bundle-safe")

View File

@@ -6,8 +6,6 @@
;;; Code:
(require 'siren-ido)
(use-package dumb-jump
:bind
("C-c C-j" . dumb-jump-go)
@@ -16,10 +14,7 @@
("M-g b" . dumb-jump-back)
("M-g i" . dumb-jump-go-prompt)
("M-g x" . dumb-jump-go-prefer-external)
("M-g z" . dumb-jump-go-prefer-external-other-window)
:custom
(dumb-jump-selector 'ido))
("M-g z" . dumb-jump-go-prefer-external-other-window))
(provide 'siren-dumb-jump)
;;; siren-dumb-jump.el ends here

View File

@@ -21,7 +21,7 @@
:custom
(projectile-cache-file (expand-file-name "projectile" siren-cache-dir))
(projectile-completion-system 'ido)
(projectile-completion-system 'default)
(projectile-enable-caching nil)
(projectile-globally-ignored-directories '(".bzr"
".eunit"

View File

@@ -6,8 +6,6 @@
;;; Code:
(require 'siren-ido)
(use-package flyspell
:straight (:type built-in)
:defer t
@@ -28,9 +26,7 @@
(unbind-key "C-;" flyspell-mode-map))
(use-package flyspell-correct
:bind ("C-/" . flyspell-correct-wrapper)
:custom
(flyspell-correct-interface #'flyspell-correct-ido))
:bind ("C-/" . flyspell-correct-wrapper))
(provide 'siren-flyspell)
;;; siren-flyspell.el ends here

View File

@@ -21,7 +21,7 @@
:custom
(magit-bury-buffer-function 'magit-mode-quit-window)
(magit-commit-arguments '("-S"))
(magit-completing-read-function 'magit-ido-completing-read)
(magit-completing-read-function 'magit-builtin-completing-read)
(magit-default-tracking-name-function
'magit-default-tracking-name-branch-only)
(magit-diff-adjust-tab-width t)