 (defun meain/pick-emoji ()
   "Pick emoji using completions."
   (interactive)
-  (let* ((selectrum-should-sort t)
-         (selectrum-display-style '(vertical))
-         ;; (selectrum-display-action 'selectrum-display-full-frame)
-         ;; (selectrum-display-action 'selectrum-max-window-height)
-         (selectrum-max-window-height 100)
-         (selectrum-fix-vertical-window-height t)
-         (filename (concat (getenv "HOME") "/.config/datafiles/emojis.txt"))
+  (let* ((filename (concat (getenv "HOME") "/.config/datafiles/emojis.txt"))
          (emojis (with-temp-buffer (insert-file-contents filename) (buffer-string))))
     (meain/copy-to-clipboard (car
                               (split-string

  :commands rg
  :init
  (evil-leader/set-key "F"
    (meain/with-alternate (let ((selectrum-display-style '(vertical)))
                            (consult-ripgrep))
                          (call-interactively 'rg)))
  :config (setq rg-command-line-flags '("--hidden" "--follow")))

;; dumb-jump

        pos-tip-background-color "#ffffff"))

;; Completions (core framework)
(use-package vertico
  :straight (vertico
             :host github :repo "minad/vertico"
             :files (:defaults "extensions/*.el"))
  :config
  (setq vertico-count 10)
  (define-key vertico-map (kbd "M-q") 'vertico-multiform-vertical)
  (define-key vertico-map (kbd "M-g") 'vertico-multiform-grid)
  (define-key vertico-map (kbd "<S-backspace>") 'vertico-directory-up)

  (defun crm-indicator (args)
    (cons (format "[CRM%s] %s"
                  (replace-regexp-in-string
                   "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
                   crm-separator)
                  (car args))
          (cdr args)))
  (advice-add #'completing-read-multiple :filter-args #'crm-indicator)

  ;; Do not allow the cursor in the minibuffer prompt
  (setq minibuffer-prompt-properties
        '(read-only t cursor-intangible t face minibuffer-prompt))
  (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)

  (setq enable-recursive-minibuffers t)

  (vertico-multiform-mode)
  (setq vertico-multiform-commands
        '((consult-ripgrep buffer indexed)
          (consult-xref buffer indexed)
          (meain/pick-emoji reverse)
          (t flat)))
  (setq vertico-multiform-categories
        '((file grid)
          (consult-grep buffer)))
  (vertico-mode))
(use-package savehist
  :init
  (savehist-mode))
(use-package orderless
  :straight t
  :custom
  (completion-styles '(orderless basic))
  (completion-category-overrides '((file (styles basic partial-completion)))))
(use-package marginalia
  :straight t
  :defer 1
  :bind (:map minibuffer-local-map ("C-b" . marginalia-cycle))
  :config (marginalia-mode))

;; Consult without consultation fees
(use-package consult
  :straight t
  :after (xref)
  :defer 1
  :config
  (setq xref-show-xrefs-function #'consult-xref args)
  (setq xref-show-definitions-function #'consult-xref args)
  (evil-set-command-property 'consult-imenu :jump t))

;; Embark stuff
