chore(editor): Replace smex with amx package

Smex has not been updated since late 2015. Amx was originally a fork of
smex, but as since evolved much further into it's own thing.

Among other things is supports other completing backends, and ivy with
it's fuzzy matching feels rather nice. I'm keeping ido-mode for
everything else, but specifically for M-x I'll give ivy a try.
This commit is contained in:
2020-03-01 22:31:16 +00:00
parent c7c8b77c28
commit c91f3fecc4
6 changed files with 51 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
(require 'siren-dash-at-point)
;; Editor
(require 'siren-amx)
(require 'siren-browse-kill-ring)
(require 'siren-display-fill-column)
(require 'siren-display-indentation)
@@ -31,7 +32,6 @@
(require 'siren-minions)
(require 'siren-mwim)
(require 'siren-rainbow)
(require 'siren-smex)
(require 'siren-undo-tree)
(require 'siren-undohist)

View File

@@ -0,0 +1,29 @@
;;; siren-amx.el --- jimeh's Emacs Siren: amx configuration.
;;; Commentary:
;; Replace M-x with the more powerful amx.
;;; Code:
(require 'siren-ivy)
(use-package amx
:bind
("M-x" . amx)
("C-x C-m" . amx)
("C-c C-m" . amx)
("C-c C-c M-x" . execute-extended-command)
:custom
(amx-backend 'ivy)
(amx-histroy-lenth 15)
(amx-prompt-string "M-x ")
(amx-save-file (expand-file-name "amx-items" siren-cache-dir))
(amx-show-key-bindings t)
:config
(amx-mode +1))
(provide 'siren-amx)
;;; siren-amx.el ends here

View File

@@ -21,7 +21,7 @@
(ido-use-faces nil)
(ido-use-filename-at-point nil)
:init
:config
(ido-mode 1))
(use-package ido-completing-read+

View File

@@ -0,0 +1,19 @@
;;; siren-ivy.el --- jimeh's Emacs Siren: ivy configuration.
;;; Commentary:
;; Basic configuration for ivy.
;;; Code:
(use-package ivy
:defer t
:custom
(ivy-use-virtual-buffers nil)
(ivy-count-format "%d ")
(ivy-re-builders-alist '((amx-completing-read-ivy . ivy--regex-fuzzy)
(t . ivy--regex-plus))))
(provide 'siren-ivy)
;;; siren-ivy.el ends here

View File

@@ -1,4 +1,4 @@
;;; siren-smex.el --- jimeh's Emacs Siren: smex.
;;; siren-smex.el --- jimeh's Emacs Siren: smex configuration.
;;; Commentary:

View File

@@ -24,7 +24,6 @@
(helm-cleanup . siren-helm--show-treemacs-maybe)
:bind
("M-x" . helm-M-x)
("C-t" . helm-imenu)
("C-c t" . helm-imenu-anywhere)
("C-x C-f" . helm-find-files)