mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Add work-around for issues with company and fci-mode
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
|
||||
(use-package company
|
||||
:config
|
||||
|
||||
;; work-around for issues with fci-mode
|
||||
(require 'siren-fci)
|
||||
|
||||
(defvar-local company-fci-mode-on-p nil)
|
||||
|
||||
(defun company-turn-off-fci (&rest ignore)
|
||||
(when (boundp 'fci-mode)
|
||||
(setq company-fci-mode-on-p fci-mode)
|
||||
(when fci-mode (fci-mode -1))))
|
||||
|
||||
(defun company-maybe-turn-on-fci (&rest ignore)
|
||||
(when company-fci-mode-on-p (fci-mode 1)))
|
||||
|
||||
(add-hook 'company-completion-started-hook 'company-turn-off-fci)
|
||||
(add-hook 'company-completion-finished-hook 'company-maybe-turn-on-fci)
|
||||
(add-hook 'company-completion-cancelled-hook 'company-maybe-turn-on-fci)
|
||||
|
||||
(setq company-begin-commands '(self-insert-command)
|
||||
company-dabbrev-downcase nil
|
||||
company-echo-delay 0
|
||||
|
||||
Reference in New Issue
Block a user