[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e1cdb29 37/67: counsel.el: Add Clojure completion at point
From: |
Oleh Krehel |
Subject: |
[elpa] master e1cdb29 37/67: counsel.el: Add Clojure completion at point |
Date: |
Sun, 22 Mar 2015 17:34:02 +0000 |
branch: master
commit e1cdb297d931205c713a25157fe652ae210cc932
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el: Add Clojure completion at point
---
counsel.el | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/counsel.el b/counsel.el
index ecb183b..c647888 100644
--- a/counsel.el
+++ b/counsel.el
@@ -35,12 +35,26 @@
(defun counsel ()
"Elisp completion at point."
(interactive)
+ (counsel--generic
+ (lambda (str) (all-completions str obarray))))
+
+(defun couns-clj ()
+ "Clojure completion at point."
+ (interactive)
+ (counsel--generic
+ (lambda (str)
+ (mapcar
+ #'cl-caddr
+ (cider-sync-request:complete str ":same")))))
+
+(defun counsel--generic (completion-fn)
+ "Complete thing at point with COMPLETION-FN."
(let* ((bnd (bounds-of-thing-at-point 'symbol))
(str (if bnd
(buffer-substring-no-properties
(car bnd) (cdr bnd))
""))
- (candidates (all-completions str obarray))
+ (candidates (funcall completion-fn str))
(ivy-height 7)
(res (ivy-read (format "pattern (%s): " str)
candidates)))
- [elpa] master 2ed9ee2 23/67: Require delsel for `minibuffer-keyboard-quit', (continued)
- [elpa] master 2ed9ee2 23/67: Require delsel for `minibuffer-keyboard-quit', Oleh Krehel, 2015/03/22
- [elpa] master 1ca1660 22/67: swiper.el: Save position before last search, Oleh Krehel, 2015/03/22
- [elpa] master 02ca7a1 25/67: Add anchoring, Oleh Krehel, 2015/03/22
- [elpa] master b1ac649 26/67: Don't recenter unless necessary, Oleh Krehel, 2015/03/22
- [elpa] master a07c2e4 27/67: swiper.el: Make ivy the default back end, Oleh Krehel, 2015/03/22
- [elpa] master baa9df7 30/67: Truncate candidates to window width in the minibuffer, Oleh Krehel, 2015/03/22
- [elpa] master 7c6d00d 32/67: ivy.el (ivy-read): Return immediately for less than 2 candidates, Oleh Krehel, 2015/03/22
- [elpa] master 315be36 31/67: counsel.el: Add, Oleh Krehel, 2015/03/22
- [elpa] master 0772929 29/67: Add some rudimentary history handling, Oleh Krehel, 2015/03/22
- [elpa] master 045fb60 28/67: ivy.el (ivy-previous-line): Change to `cl-decf', Oleh Krehel, 2015/03/22
- [elpa] master e1cdb29 37/67: counsel.el: Add Clojure completion at point,
Oleh Krehel <=
- [elpa] master 7ff3dd9 35/67: Need to check value of variable, Oleh Krehel, 2015/03/22
- [elpa] master c78cc15 34/67: swiper.el: Clean up overlays better on "C-g", Oleh Krehel, 2015/03/22
- [elpa] master e7b560c 38/67: swiper.el (swiper--opoint): Fix bad defvar, Oleh Krehel, 2015/03/22
- [elpa] master d78caee 33/67: Open invisible overlays using isearch, Oleh Krehel, 2015/03/22
- [elpa] master 8818a01 36/67: swiper.el: Fix error for empty buffer, Oleh Krehel, 2015/03/22
- [elpa] master 984346c 40/67: swiper.el (swiper-font-lock-ensure): Exclude a few modes, Oleh Krehel, 2015/03/22
- [elpa] master cb26121 41/67: ivy.el: Fix ivy-history recording the full text instead of input, Oleh Krehel, 2015/03/22
- [elpa] master de80846 39/67: Work around magit highlighting problem, Oleh Krehel, 2015/03/22
- [elpa] master 7bb5320 42/67: swiper.el (swiper--helm): Require helm-match-plugin, Oleh Krehel, 2015/03/22
- [elpa] master caa69f2 43/67: counsel.el: Add git file completion, Oleh Krehel, 2015/03/22