The Complete Computer

Completing Read Replacement and Extension

LifeTechEmacsArcology

high-chaos organization here... replacing Ivy and Counsel and Ivy Posframe with the new hotness, this constellation of packages:

Selectrum, Prescient, and Orderless

emacs-lisp source: 
(use-package vertico :init (vertico-mode) (setq completion-in-region-function (lambda (&rest args) (apply (if vertico-mode #'consult-completion-in-region #'completion--in-region) args))) :bind ("C-x C-z" . 'vertico-repeat)) (use-package prescient :after (vertico) :config (prescient-persist-mode +1) (defun vertico-prescient-remember () "Remember the chosen candidate with Prescient." (when (>= vertico--index 0) (prescient-remember (substring-no-properties (nth vertico--index vertico--candidates))))) (advice-add #'vertico-insert :after #'vertico-prescient-remember) :custom (vertico-sort-function #'prescient-completion-sort)) (use-package orderless :after (prescient) :custom (completion-styles '(prescient orderless)))

Consult

Consult contains a bunch of nice builtin-replacements which utilize these other libraries to their fullest extent. consult-buffer in particular is quite nice, for example.

emacs-lisp source: 
(use-package consult :init (setq xref-show-xrefs-function #'consult-xref xref-show-definitions-function #'consult-xref) :config (setq consult-narrow-key "<") (autoload 'projectile-project-root "projectile") (setq consult-project-root-function #'projectile-project-root) (unless (s-contains? "--glob" consult-ripgrep-args) (setq consult-ripgrep-args (s-concat consult-ripgrep-args " --glob \"!*~\" ."))) :bind ("C-x b" . consult-buffer) ("C-x 4 b" . consult-buffer-other-window) ("C-x 5 b" . consult-buffer-other-frame) ("C-c h" . consult-history) ("C-c k" . consult-kmacro) (:map evil-leader--default-map ("b" . consult-buffer) ("<SPC>" . execute-extended-command)) (:map evil-normal-state-map ("M-y" . consult-yank-pop) ("/" . consult-line))) (use-package consult-flycheck :bind (:map flycheck-command-map ("!" . consult-flycheck)))

You can do quite a lot with Consult like:

NEXT Fix Consult-omni

i got sick of trying to package consult-omni source plugins that this guy won't stick on MELPA...

Consult Omni is pretty cool, it lets you query a bunch of different backend sources asynchronously, like Wikipedia and DuckDuckGo. I'll try using this especially to add references to items in my Knowledge Base and Archive . The gptel one is maybe interesting to quickly query The Arcology Onsite Oracle or at least the underlying ollama instance.

I may change my Consult-Buffer Org Roam Source to be an Omni source, though it may not be such a performance improvement since most of the time spent in that thing is rendering the candidates in elisp, not in the call to retrieve the candidates. It would be at least nice to have one multi-command to put on C-x b and SPC b

emacs-lisp source: 
;; (use-package consult-omni ;; :after consult gptel ;; :custom ;; (consult-omni-show-preview t) ;; (consult-omni-preview-key "C-o") ;; :config ;; (require 'consult-omni-embark) ;; (require 'consult-omni-sources) ;; ;; Load Embark Actions ;; (require 'consult-omni-embark) ;; (setq consult-omni-sources-modules-to-load ;; '(consult-omni-wikipedia ;; consult-omni-duckduckgo ;; consult-omni-calc ;; consult-omni-gptel)) ;; (consult-omni-sources-load-modules) ;; (setq consult-omni-multi-sources ;; '("DuckDuckGo API" "calc" "Wikipedia") ;; ;; (--map (car it) consult-omni-sources-alist) ;; ) ;; (setq consult-omni-default-interactive-command #'consult-omni-multi) ;; (evil-leader/set-key (kbd "k") #'consult-omni))

And the melpaBuild definition for Arroyo Emacs , since I don't use straight-use-package like most folks:

nix source: :tangle ~/arroyo-nix/overrides/consult-omni.nix :mkdirp yes :results none
# consult-omni = epkgs.melpaBuild { # pname = "consult-omni"; # version = pkgs.lib.pkgVersions.consult-omni.version; # commit = pkgs.lib.pkgVersions.consult-omni.commit; # src = pkgs.callPackage pkgs.lib.pkgVersions.consult-omni.src {}; # recipe = pkgs.writeText "recipe" '' # (consult-omni # :repo "armindarvish/consult-omni" # :fetcher github # :files ("*.el" "lisp/*.el" # "sources" "sources/*.el" # "dir" "*.info" "*.texi" "*.texinfo" # "doc/dir" "doc/*.info" "doc/*.texi" "doc/*.texinfo" # "docs/dir" "docs/*.info" "docs/*.texi" "docs/*.texinfo" # (:exclude # ".dir-locals.el" "lisp/.dir-locals.el" # "test.el" "tests.el" "*-test.el" "*-tests.el" # "lisp/test.el" "lisp/tests.el" "lisp/*-test.el" "lisp/*-tests.el"))) # ''; # preBuild = '' # ls # rm sources/consult-omni-mu.el # ''; # packageRequires = with epkgs; [ # consult consult-gh consult-notmuch consult-notes # browser-hist gptel elfeed embark # ]; # meta = { # license = pkgs.lib.licenses.gpl3; # homepage = "https://github.com/armindarvish/consult-omni"; # description = "consult-omni is a package for getting search results from one or several custom sources directly in Emacs minibuffer."; # }; # };

Embark and Marginalia

emacs-lisp source: 
(use-package marginalia :config (marginalia-mode) :bind (("M-A" . marginalia-cycle) :map minibuffer-local-map ("M-A" . marginalia-cycle))) (use-package embark :bind (("C-S-a" . embark-act) ;; pick some comfortable binding ("C-h b" . embark-bindings)) ;; alternative for `describe-bindings' :init (setq prefix-help-command #'embark-prefix-help-command) :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))))) ;; Consult users will also want the embark-consult package. (use-package embark-consult :after (embark consult) :demand t)

Mini Frame

this is disabled because it doesn't work well with xmonad.

The only interesting things here is that i set parent-frame to nil similar to how i have to configure Ivy Posframe -- this is for EXWM windowing support. I also disable the mini-frame in a bunch of spots. (mini-frame-mode -1)

emacs-lisp source: :tangle no
(use-package mini-frame :config (mini-frame-mode +1) (setq resize-mini-frames t) (setq mini-frame-detach-on-hide t) ;; (setq mini-frame-show-parameters ;; '((parent-frame . nil) ;; (top . 25) ;; (height . 1) ;; (width . 0.7) ;; (left . 0.5))) (dolist (cmd '(calcDigit-start background-shell-command evil-ex consult-line org-fc-type-text-input-setup consult-ripgrep)) (add-to-list 'mini-frame-ignore-commands cmd)))