From 9c5dc2868c85e80917225209711b9371a3003880 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Tue, 21 Jun 2022 16:06:42 +0530 Subject: [PATCH 1/3] separate completion ui from editing ui --- corgi-completion-ui/corgi-completion-ui.el | 50 ++++++++++++++++++++++ corgi-editor/corgi-editor.el | 43 +------------------ 2 files changed, 52 insertions(+), 41 deletions(-) create mode 100644 corgi-completion-ui/corgi-completion-ui.el diff --git a/corgi-completion-ui/corgi-completion-ui.el b/corgi-completion-ui/corgi-completion-ui.el new file mode 100644 index 0000000..c620db6 --- /dev/null +++ b/corgi-completion-ui/corgi-completion-ui.el @@ -0,0 +1,50 @@ +;;; corgi-completion-ui.el --- Interactive completion user interface configuration for Corgi -*- lexical-binding: t -*- +;; +;; Filename: corgi-completion-ui.el +;; Package-Requires: ((company) (counsel) (ivy) (ivy-prescient) (projectile) (swiper)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(use-package ivy + :defer 0.1 + :diminish + :init + (setq ivy-use-virtual-buffers t) + :config + (ivy-mode) + (define-key ivy-minibuffer-map (kbd "C-j") #'ivy-next-line) + (define-key ivy-minibuffer-map (kbd "C-k") #'ivy-previous-line)) + +(use-package counsel + :after (ivy) + :diminish + :config + (counsel-mode) + ;; This ensures that SPC f r (counsel-recentf, show recently opened files) + ;; actually works + (recentf-mode 1)) + +(use-package ivy-prescient + :after (ivy) + :config + (ivy-prescient-mode 1) + (prescient-persist-mode 1)) + +(use-package swiper + :after (ivy) + :bind (("C-s" . swiper))) + +(use-package projectile + :config + (projectile-mode) + (setq projectile-create-missing-test-files t)) + +(use-package company + :diminish company-mode + :hook (prog-mode . company-mode)) + +(provide 'corgi-completion-ui) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; corgi-completion-ui.el ends here diff --git a/corgi-editor/corgi-editor.el b/corgi-editor/corgi-editor.el index a3c3471..12f4f17 100644 --- a/corgi-editor/corgi-editor.el +++ b/corgi-editor/corgi-editor.el @@ -1,7 +1,7 @@ -;;; corgi-editor.el --- User interface configuration for Corgi -*- lexical-binding: t -*- +;;; corgi-editor.el --- Editing user interface configuration for Corgi -*- lexical-binding: t -*- ;; ;; Filename: corgi-editor.el -;; Package-Requires: ((use-package) (aggressive-indent) (avy) (company) (counsel) (diminish) (dumb-jump) (evil) (evil-cleverparens) (evil-collection) (evil-surround) (expand-region) (goto-last-change) (ivy) (ivy-prescient) (projectile) (rainbow-delimiters) (smartparens) (smex) (string-edit-at-point) (swiper) (undo-fu) (which-key) (winum) (xclip)) +;; Package-Requires: ((use-package) (aggressive-indent) (avy) (diminish) (dumb-jump) (evil) (evil-cleverparens) (evil-collection) (evil-surround) (expand-region) (goto-last-change) (rainbow-delimiters) (smartparens) (smex) (string-edit-at-point) (undo-fu) (which-key) (winum) (xclip)) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -15,35 +15,6 @@ eldoc-mode subword-mode) -(use-package ivy - :defer 0.1 - :diminish - :init - (setq ivy-use-virtual-buffers t) - :config - (ivy-mode) - (define-key ivy-minibuffer-map (kbd "C-j") #'ivy-next-line) - (define-key ivy-minibuffer-map (kbd "C-k") #'ivy-previous-line)) - -(use-package counsel - :after (ivy) - :diminish - :config - (counsel-mode) - ;; This ensures that SPC f r (counsel-recentf, show recently opened files) - ;; actually works - (recentf-mode 1)) - -(use-package ivy-prescient - :after (ivy) - :config - (ivy-prescient-mode 1) - (prescient-persist-mode 1)) - -(use-package swiper - :after (ivy) - :bind (("C-s" . swiper))) - (use-package avy) (use-package undo-fu) @@ -118,15 +89,6 @@ inferior-emacs-lisp-mode) . rainbow-delimiters-mode)) -(use-package company - :diminish company-mode - :hook (prog-mode . company-mode)) - -(use-package projectile - :config - (projectile-mode) - (setq projectile-create-missing-test-files t)) - (use-package dumb-jump) (use-package goto-last-change) @@ -140,7 +102,6 @@ (require 'evil-core) (require 'winum) (require 'evil-collection) -(require 'ivy) (when (and (not (display-graphic-p)) (executable-find "xclip")) From e7ad7dbee80f6ace1543ef3a37db21056c22e9ba Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Thu, 23 Jun 2022 12:09:25 +0530 Subject: [PATCH 2/3] silence byte compiler --- corgi-completion-ui/corgi-completion-ui.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corgi-completion-ui/corgi-completion-ui.el b/corgi-completion-ui/corgi-completion-ui.el index c620db6..cb4385e 100644 --- a/corgi-completion-ui/corgi-completion-ui.el +++ b/corgi-completion-ui/corgi-completion-ui.el @@ -44,6 +44,9 @@ :diminish company-mode :hook (prog-mode . company-mode)) +;; silence byte compiler +(require 'ivy) + (provide 'corgi-completion-ui) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From b561a797dbc45fd0f24a890f8ee4bdeb72cc4fb4 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Thu, 23 Jun 2022 13:49:57 +0530 Subject: [PATCH 3/3] add use-package --- corgi-completion-ui/corgi-completion-ui.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/corgi-completion-ui/corgi-completion-ui.el b/corgi-completion-ui/corgi-completion-ui.el index cb4385e..1e0fd3d 100644 --- a/corgi-completion-ui/corgi-completion-ui.el +++ b/corgi-completion-ui/corgi-completion-ui.el @@ -6,6 +6,8 @@ ;; ;;; Code: +(require 'use-package) + (use-package ivy :defer 0.1 :diminish