Emacs: Set company-idle-delay to 0.5 and refactor.

This commit is contained in:
tastytea 2020-03-09 15:18:51 +01:00
parent 65671f96a7
commit b788e7d8f0

View File

@ -1,6 +1,6 @@
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-02-28T05:05:27+0100> ;; Time-stamp: <2020-03-09T15:18:43+0100>
;;; Commentary: ;;; Commentary:
@ -73,26 +73,16 @@
(unless slow-computer (unless slow-computer
(use-package company (use-package company
:diminish company-mode :diminish company-mode
:custom ((company-minimum-prefix-length 1) ; Suggestions after 1 character.
:custom (company-selection-wrap-around t)
;; Show suggestions after entering one character. (company-tooltip-align-annotations t) ; Align to the right border.
(company-minimum-prefix-length 1) (company-idle-delay 0.5))
(company-selection-wrap-around t) ; Wrap around at end/beginning of list. :bind (:map company-active-map
; Align annotation to the right border.
(company-tooltip-align-annotations t)
(company-idle-delay 0) ; No delay.
:bind
(:map company-active-map
("<return>" . nil) ; Disable completion on return. ("<return>" . nil) ; Disable completion on return.
("RET" . nil) ; https://emacs.stackexchange.com/a/13290 ("RET" . nil) ; https://emacs.stackexchange.com/a/13290
("<tab>" . company-complete-selection) ; Make tab work in lists (GUI). ("<tab>" . company-complete-selection) ; Make tab work in lists.
("TAB" . company-complete-selection) ; Same in terminals. ("TAB" . company-complete-selection)) ; Tab in terminals.
) :hook (after-init . global-company-mode))
:hook
(after-init . global-company-mode)
)
;; Fuzzy autocompletion for company. ;; Fuzzy autocompletion for company.
(use-package company-flx (use-package company-flx