refactor(emacs.d): Move ivy configuration to use-package

This commit is contained in:
Vincent Ambo 2019-12-17 11:46:41 +00:00
parent 7965f3ba3a
commit 5727b6d24f
3 changed files with 31 additions and 21 deletions

View file

@ -5,9 +5,6 @@
;; What does <tab> do? Well, it depends ...
(define-key prog-mode-map (kbd "<tab>") #'company-indent-or-complete-common)
;; Counsel stuff:
(global-set-key (kbd "C-c r g") 'counsel-rg)
;; imenu instead of insert-file
(global-set-key (kbd "C-x i") 'imenu)
@ -40,7 +37,4 @@
;; Open a file in project:
(global-set-key (kbd "C-c f") 'project-find-file)
;; Use swiper instead of isearch
(global-set-key "\C-s" 'swiper)
(provide 'bindings)

View file

@ -36,6 +36,11 @@
:hook ((prog-mode . company-mode))
:config (setq company-tooltip-align-annotations t))
(use-package counsel
:after (ivy)
:config (counsel-mode 1)
:bind (("C-c r g" . counsel-rg)))
(use-package dash)
(use-package dash-functional)
(use-package dottime :config (dottime-display-mode t))
@ -43,18 +48,43 @@
(use-package ht)
(use-package hydra)
(use-package idle-highlight-mode :hook ((prog-mode . idle-highlight-mode)))
(use-package ivy
:config
(ivy-mode 1)
(setq enable-recursive-minibuffers t)
(setq ivy-use-virtual-buffers t))
(use-package ivy-pass :after (ivy))
(use-package ivy-prescient
:after (ivy prescient)
:config
(ivy-prescient-mode))
(use-package multiple-cursors)
(use-package paredit :hook ((lisp-mode . paredit-mode)
(emacs-lisp-mode . paredit-mode)))
(use-package multiple-cursors)
(use-package pinentry
:config
(setq epa-pinentry-mode 'loopback)
(pinentry-start))
(use-package prescient
:after (ivy counsel)
:config (prescient-persist-mode))
(use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode))
(use-package rainbow-mode)
(use-package s)
(use-package string-edit)
(use-package swiper
:after (counsel ivy)
:bind (("C-s" . swiper)))
(use-package telephone-line) ;; configuration happens outside of use-package
(use-package term-switcher)
(use-package undo-tree :config (global-undo-tree-mode))

View file

@ -1,18 +1,4 @@
(require 'prescient)
(require 'ivy-prescient)
(require 'uniquify)
(require 'ivy-pass)
;; Make ivy go!
(ivy-mode 1)
(counsel-mode 1)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
;; Enable support for prescient in ivy & configure it
(ivy-prescient-mode)
(prescient-persist-mode)
;; Move files to trash when deleting
(setq delete-by-moving-to-trash t)