From db9dddcecc39825269454828260673f02b79a459 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 13 Apr 2021 03:45:00 +0100 Subject: company tweaks --- completion.org | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'completion.org') 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. - ("" . #'company-complete-selection) - ("TAB" . #'company-complete-selection) + ("" . #'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)) ("" . #'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) -- cgit v1.2.3