[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ac1dc5b 034/348: counsel.el (counsel-company): New command
From: |
Oleh Krehel |
Subject: |
[elpa] master ac1dc5b 034/348: counsel.el (counsel-company): New command |
Date: |
Sat, 8 Apr 2017 11:03:18 -0400 (EDT) |
branch: master
commit ac1dc5bcdfac0b4ae64122690ae22c755d73e790
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-company): New command
Re #331
---
counsel.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/counsel.el b/counsel.el
index 6eb5c5f..edab7c6 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2089,6 +2089,20 @@ And insert it into the minibuffer. Useful during
:action #'counsel-linux-app-action-default
:caller 'counsel-linux-app))
+;;;###autoload
+(defun counsel-company ()
+ "Complete using `company-candidates'."
+ (interactive)
+ (unless company-candidates
+ (company-complete))
+ (when company-point
+ (company-complete-common)
+ (when (looking-back company-common (line-beginning-position))
+ (setq ivy-completion-beg (match-beginning 0))
+ (setq ivy-completion-end (match-end 0)))
+ (ivy-read "company cand: " company-candidates
+ :action #'ivy-completion-in-region-action)))
+
;;** `counsel-mode'
(defvar counsel-mode-map
(let ((map (make-sparse-keymap)))
- [elpa] master 6c669ff 014/348: File sorting function using a priority order for extensions, (continued)
- [elpa] master 6c669ff 014/348: File sorting function using a priority order for extensions, Oleh Krehel, 2017/04/08
- [elpa] master 9407b21 021/348: swiper.el (swiper-action-recenter): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master f3690b6 019/348: Make "M-o j" consistent for ivy-switch-buffer and counsel-find-file, Oleh Krehel, 2017/04/08
- [elpa] master 79ffa67 009/348: ivy.el (ivy--filter): Recompute index after sort, Oleh Krehel, 2017/04/08
- [elpa] master c2646d4 020/348: counsel.el (counsel-load-theme-action): Update, Oleh Krehel, 2017/04/08
- [elpa] master aadc062 024/348: ivy-test.el: Add a provide statement, Oleh Krehel, 2017/04/08
- [elpa] master eba0d9e 008/348: swiper.el (swiper--ivy): Remove interactive, Oleh Krehel, 2017/04/08
- [elpa] master c20867b 022/348: ivy-hydra.el: Add package tags, Oleh Krehel, 2017/04/08
- [elpa] master 37a9629 018/348: ivy.el (ivy--reset-state): Fix ivy-resume for files, Oleh Krehel, 2017/04/08
- [elpa] master c4775b6 031/348: ivy.el (ivy-action-wrap): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master ac1dc5b 034/348: counsel.el (counsel-company): New command,
Oleh Krehel <=
- [elpa] master cba67e4 038/348: counsel.el (counsel-bookmark): Add require, Oleh Krehel, 2017/04/08
- [elpa] master 3d48093 027/348: counsel.el (counsel--gg-sentinel): Add a work around, Oleh Krehel, 2017/04/08
- [elpa] master ddb4681 025/348: counsel.el (counsel-git-grep-cmd-default): New defvar, Oleh Krehel, 2017/04/08
- [elpa] master cf38ceb 040/348: swiper.el (swiper-font-lock-exclude): Add forth-mode, Oleh Krehel, 2017/04/08
- [elpa] master ab55e03 055/348: counsel.el (counsel-set-variable): Add :preselect, Oleh Krehel, 2017/04/08
- [elpa] master f4ec789 056/348: counsel.el (counsel-set-variable): Fix 2nd preselect, Oleh Krehel, 2017/04/08
- [elpa] master 792b7b7 051/348: counsel.el (counsel-set-variable): New command, Oleh Krehel, 2017/04/08
- [elpa] master dc4a858 060/348: counsel.el (counsel-hydra-heads): New command, Oleh Krehel, 2017/04/08
- [elpa] master cd8a570 062/348: Escape `%` chars if present in the symbol value, Oleh Krehel, 2017/04/08
- [elpa] master 97cf30d 063/348: Add multiple-cursors support to ivy-completion-in-region-action, Oleh Krehel, 2017/04/08