summaryrefslogtreecommitdiffhomepage
path: root/attic
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-15 22:38:05 +0100
committerjao <jao@gnu.org>2021-04-15 22:38:05 +0100
commit3c6e40cfe291558a5d041201d65dd1fef58d7a82 (patch)
tree2a0ca665cbf466fa36a80923a479375dddc9dd85 /attic
parent38646b8a1f9f5c4ce9d8554f66b272f2d08a4e18 (diff)
downloadelibs-3c6e40cfe291558a5d041201d65dd1fef58d7a82.tar.gz
elibs-3c6e40cfe291558a5d041201d65dd1fef58d7a82.tar.bz2
my family and other animals
Diffstat (limited to 'attic')
-rw-r--r--attic/counsel.org61
1 files changed, 61 insertions, 0 deletions
diff --git a/attic/counsel.org b/attic/counsel.org
index f6814ae..a2147b5 100644
--- a/attic/counsel.org
+++ b/attic/counsel.org
@@ -1,5 +1,66 @@
#+title: Completion configuration using ivy, counsel and friends
+* company
+ #+begin_src emacs-lisp
+ (use-package company
+ :ensure t
+ :custom
+ ((company-global-modes '(clojure-mode
+ clojurec-mode
+ emacs-lisp-mode
+ ;; eshell-mode
+ haskell-mode
+ haskell-interactive-mode
+ idris-mode
+ lisp-interaction-mode
+ message-mode
+ org-mode
+ pie-mode
+ scheme-mode))
+ (company-idle-delay 0.15)
+ (company-lighter "")
+ (company-lighter-base "")
+ (company-show-numbers nil)
+ (company-tooltip-limit 15)
+ (company-tooltip-align-annotations t)
+ (company-transformers '(company-sort-by-occurrence)))
+
+ :config
+
+ (defun jao-complete-at-point ()
+ "Complete using company unless we're in the minibuffer."
+ (interactive)
+ (if (window-minibuffer-p) (completion-at-point) (company-manual-begin)))
+
+ :bind (;; ([remap completion-at-point] . #'jao-complete-at-point)
+ ;; ([remap complete-symbol] . #'jao-complete-at-point)
+
+ ;; The following are keybindings that take effect whenever
+ ;; the completions menu is visible, even if the user has not
+ ;; explicitly interacted with Company.
+ :map company-active-map
+
+ ("<tab>" . #'company-complete-common-or-cycle)
+ ("TAB" . #'company-complete-common-or-cycle)
+
+ ("C-h" . #'company-show-doc-buffer)
+ ("M-." . #'company-show-location)
+
+ :filter (or (not (derived-mode-p 'eshell-mode))
+ (company-explicit-action-p))
+ ("<return>" . #'company-complete-selection)
+ ("RET" . #'company-complete-selection))
+
+ :bind* (("M-TAB" . #'jao-complete-at-point))
+
+ :diminish)
+
+ ;; (use-package company-math :ensure t :after company)
+
+ ;; (global-company-mode 1)
+
+ #+end_src
+
* selectrum
#+begin_src emacs-lisp :load no
(use-package selectrum