   "Hook to run when exiting the minibuffer."
   (csetq gc-cons-threshold user/gc-cons-threshold))
 
-(add-hook 'minibuffer-setup-hook #'hide-trailing-whitespace)
-
 ;; Increase the memory while in the minibuffer
 (add-hook 'minibuffer-setup-hook #'user/minibuffer-setup-hook)
 (add-hook 'minibuffer-exit-hook #'user/minibuffer-exit-hook)
-
-(general-define-key
- :keymaps '(minibuffer-local-map
-            minibuffer-local-ns-map
-            minibuffer-local-completion-map
-            minibuffer-local-must-match-map
-            minibuffer-local-isearch-map)
- "<escape>" #'minibuffer-keyboard-quit)
 
 (with-eval-after-load 'xref
   (add-to-list 'xref-prompt-for-identifier 'xref-find-references t)

  :general
  ("C-c C-r" #'ivy-resume)
  (:keymaps 'ivy-mode-map
            "<escape>" #'minibuffer-keyboard-quit)
  :custom
  (ivy-count-format "")
  (ivy-height 9)

(csetq flyspell-issue-message-flag nil)
(csetq flyspell-use-meta-tab nil)

(defun hide-trailing-whitespace ()
  "Used for hooks to various modes."
  (setq-local show-trailing-whitespace nil))
