Minor edits.

This commit is contained in:
Derek Taylor
2020-11-05 13:27:52 -06:00
parent 8fbacc6392
commit 35112d3f8c
170 changed files with 1304 additions and 756 deletions

View File

@@ -4,8 +4,7 @@
:commands company-complete-common company-manual-begin company-grab-line
:hook (doom-first-input . global-company-mode)
:init
(setq company-idle-delay 0.25
company-minimum-prefix-length 2
(setq company-minimum-prefix-length 2
company-tooltip-limit 14
company-tooltip-align-annotations t
company-require-match 'never
@@ -53,20 +52,21 @@
:before #'company-begin-backend
(company-abort)))
(add-hook 'after-change-major-mode-hook #'+company-init-backends-h 'append))
(add-hook 'after-change-major-mode-hook #'+company-init-backends-h 'append)
(when (featurep! +tng)
(company-tng-mode +1))
(use-package! company-tng
:when (featurep! +tng)
:after-call post-self-insert-hook
:config
(add-to-list 'company-frontends 'company-tng-frontend)
(define-key! company-active-map
"RET" nil
[return] nil
"TAB" #'company-select-next
[tab] #'company-select-next
[backtab] #'company-select-previous))
;; NOTE Fix #1335: ensure `company-emulation-alist' is the first item of
;; `emulation-mode-map-alists', thus higher priority than keymaps of
;; evil-mode. We raise the priority of company-mode keymaps
;; unconditionally even when completion is not activated. This should not
;; cause problems, because when completion is activated, the value of
;; `company-emulation-alist' is ((t . company-my-keymap)), when
;; completion is not activated, the value is ((t . nil)).
(add-hook! 'evil-local-mode-hook
(when (memq 'company-emulation-alist emulation-mode-map-alists)
(company-ensure-emulation-alist))))
;;
@@ -137,7 +137,20 @@
https://github.com/sebastiencs/company-box/issues/44"
:around #'company-box--update-scrollbar
(letf! ((#'display-buffer-in-side-window #'ignore))
(apply orig-fn args))))
(apply orig-fn args)))
;; `company-box' performs insufficient frame-live-p checks. Any command that
;; "cleans up the session" will break company-box.
;; TODO Fix this upstream.
(defadvice! +company-box-detect-deleted-frame-a (frame)
:filter-return #'company-box--get-frame
(if (frame-live-p frame) frame))
(defadvice! +company-box-detect-deleted-doc-frame-a (_selection frame)
:before #'company-box-doc
(and company-box-doc-enable
(frame-local-getq company-box-doc-frame frame)
(not (frame-live-p (frame-local-getq company-box-doc-frame frame)))
(frame-local-setq company-box-doc-frame nil frame))))
(use-package! company-dict

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el
(package! company :pin "4462e7d399c3d2e1ea1f5d018f4537f1f3d5acfc")
(package! company :pin "5f5949b6ae8ea9df94c6cb3e01d9cae43623b794")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(when (featurep! +childframe)
(package! company-box :pin "d8f71fde7a3301a62f9f6f627aa51610a294f4df"))
(package! company-box :pin "be37a9a30dc112ab172af21af694e2cb04a74f85"))