aboutsummaryrefslogtreecommitdiff
path: root/Doom/.config
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-07-17 22:03:48 +0100
committerdx <aryadevchavali1@gmail.com>2020-07-17 22:03:48 +0100
commit254c8a33bb0bea30b7b88db6563bb19a6739489a (patch)
treec56024357e02aafcc7af44a19bbea7d3b0bd15cb /Doom/.config
parent94644d01f2a816fdaa61c8e2b435fce51a68090d (diff)
downloaddotfiles-254c8a33bb0bea30b7b88db6563bb19a6739489a.tar.gz
dotfiles-254c8a33bb0bea30b7b88db6563bb19a6739489a.tar.bz2
dotfiles-254c8a33bb0bea30b7b88db6563bb19a6739489a.zip
+made my own completion module using ido module
Basically copied the parts I liked of the ido module and removed the parts I didn't.
Diffstat (limited to 'Doom/.config')
-rw-r--r--Doom/.config/doom/init.el10
-rw-r--r--Doom/.config/doom/modules/private/completion/config.el63
-rw-r--r--Doom/.config/doom/modules/private/completion/packages.el8
3 files changed, 57 insertions, 24 deletions
diff --git a/Doom/.config/doom/init.el b/Doom/.config/doom/init.el
index ac7bf96..b61d62d 100644
--- a/Doom/.config/doom/init.el
+++ b/Doom/.config/doom/init.el
@@ -12,9 +12,9 @@
bindings
gentemplate
narrow
+ completion
;; (ocaml +lsp)
;; (rss +elfeed)
- ;;(completion)
:input
;;chinese
@@ -22,11 +22,11 @@
:completion
(company +childframe) ; the ultimate code completion backend
- ;; (ivy
- ;; +fuzzy
- ;; +icons) ; a search engine for love and life
+ ;;(ivy
+ ;; +fuzzy
+ ;; +icons) ; a search engine for love and life
;;helm ; the *other* search engine for love and life
- ido ; the other *other* search engine...
+ ;;ido ; the other *other* search engine...
:ui
;;deft ; notational velocity for Emacs
diff --git a/Doom/.config/doom/modules/private/completion/config.el b/Doom/.config/doom/modules/private/completion/config.el
index 29d1ee1..58a5467 100644
--- a/Doom/.config/doom/modules/private/completion/config.el
+++ b/Doom/.config/doom/modules/private/completion/config.el
@@ -1,21 +1,46 @@
;;; private/completion/config.el -*- lexical-binding: t; -*-
-(map!
- :map icomplete-minibuffer-map
- ;; unbind anything I want to use for useful stuff
- "C-j" nil
- "C-k" nil
- "C-b" nil
- "TAB" nil
-
- "C-j" #'icomplete-forward-completions
- "C-k" #'icomplete-backward-completions
- "C-n" #'icomplete-forward-completions
- "C-p" #'icomplete-backward-completions
- "TAB" #'icomplete-force-complete
- "C-b" #'completions)
-
-(setq icomplete-separator "\t|\t")
-(setq icomplete-in-buffer t)
-
-(add-hook 'doom-first-input-hook #'icomplete-mode)
+(use-package! ido
+ :hook (doom-first-input . ido-mode)
+ :hook (ido-mode . recentf-mode)
+ :hook (ido-mode . ido-everywhere)
+ :hook (ido-mode . ido-ubiquitous-mode)
+
+ :preface
+ (defadvice! +ido-run-hooks-a (&rest _)
+ :after #'ido-mode
+ (run-hooks 'ido-mode-hook))
+
+ :init
+ (setq ido-save-directory-list-file nil)
+ (setq ido-save-directory-list-file nil)
+ (setq ido-ignore-buffers '("\\` " "^\\*ESS\\*" "^\\*[Hh]elp" "^\\*.*Completions\\*$" "^\\*tramp" "^\\*cvs-" "^*Ido"))
+ (setq ido-separator "\n")
+
+ :config
+ (defun +completion/recentf()
+ (interactive)
+ (find-file (completing-read "Recentf: " recentf-list)))
+ (define-key!
+ [remap recentf-open-files] #'+completion/recentf)
+ (map!
+ :map (ido-common-completion-map ido-file-completion-map ido-buffer-completion-map)
+ "C-k" #'ido-prev-match
+ "C-j" #'ido-next-match
+ "TAB" #'ido-exit-minibuffer
+ :map ido-file-completion-map
+ "~" (cmd! (if (looking-back "/" (point-min))
+ (insert "~/")
+ (call-interactively #'self-insert-command)))))
+
+
+(use-package! ido-sort-mtime
+ :hook (ido-mode . ido-sort-mtime-mode))
+
+
+(use-package! crm-custom
+ :hook (ido-mode . crm-custom-mode))
+
+
+(use-package! flx-ido
+ :hook (ido-mode . flx-ido-mode))
diff --git a/Doom/.config/doom/modules/private/completion/packages.el b/Doom/.config/doom/modules/private/completion/packages.el
new file mode 100644
index 0000000..39f4472
--- /dev/null
+++ b/Doom/.config/doom/modules/private/completion/packages.el
@@ -0,0 +1,8 @@
+;; -*- no-byte-compile: t; -*-
+;;; private/completion/packages.el
+
+
+(package! flx-ido)
+(package! ido-completing-read+)
+(package! ido-sort-mtime)
+(package! crm-custom)