summaryrefslogtreecommitdiffhomepage
path: root/completion.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-13 03:45:00 +0100
committerjao <jao@gnu.org>2021-04-13 03:45:00 +0100
commitdb9dddcecc39825269454828260673f02b79a459 (patch)
treec8161bad44b503e74f24d075c601cebbd32da656 /completion.org
parent4d413099d7568c06d78d1d0bb9cf7a0ee6e7c643 (diff)
downloadelibs-db9dddcecc39825269454828260673f02b79a459.tar.gz
elibs-db9dddcecc39825269454828260673f02b79a459.tar.bz2
company tweaks
Diffstat (limited to 'completion.org')
-rw-r--r--completion.org28
1 files changed, 5 insertions, 23 deletions
diff --git a/completion.org b/completion.org
index 852ca37..6a62778 100644
--- a/completion.org
+++ b/completion.org
@@ -9,8 +9,9 @@
clojurec-mode
emacs-lisp-mode
eshell-mode
- lisp-interaction-mode
haskell-mode
+ idris-mode
+ lisp-interaction-mode
message-mode
org-mode
scheme-mode))
@@ -23,9 +24,6 @@
(company-transformers '(company-sort-by-occurrence)))
:config
- ;; Prevent non-matching input (which will dismiss the completions
- ;; menu), but only if the user interacts explicitly with Company.
- (setq company-require-match #'company-explicit-action-p)
(defun jao-complete-at-point ()
"Complete using company unless we're in the minibuffer."
@@ -40,34 +38,18 @@
;; explicitly interacted with Company.
:map company-active-map
- ([remap scroll-up-command] . nil)
- ([remap scroll-down-command] . nil)
-
- ;; Make TAB always complete the current selection, instead of
- ;; only completing a common prefix.
- ("<tab>" . #'company-complete-selection)
- ("TAB" . #'company-complete-selection)
+ ("<tab>" . #'company-complete-common-or-cycle)
+ ("TAB" . #'company-complete-common-or-cycle)
("C-h" . #'company-show-doc-buffer)
("M-." . #'company-show-location)
- ;; The following are keybindings that only take effect
- ;; if not in eshell. Note that `:map' from above is
- ;; "sticky", and applies also below.
- ;; Another interesting :filter (company-explicit-action-p)
-
:filter (or (not (derived-mode-p 'eshell-mode))
(company-explicit-action-p))
("<return>" . #'company-complete-selection)
("RET" . #'company-complete-selection))
- :bind* (;; The default keybinding for `completion-at-point' and
- ;; `complete-symbol' is M-TAB or equivalently C-M-i. We
- ;; already remapped those bindings to `company-manual-begin'
- ;; above. Here we make sure that they definitely invoke
- ;; `company-manual-begin' even if a minor mode binds M-TAB
- ;; directly.
- ("M-TAB" . #'jao-complete-at-point))
+ :bind* (("M-TAB" . #'jao-complete-at-point))
:diminish)