diff options
| author | randy1burrell <randy1burrell@yahoo.com> | 2021-01-28 17:15:27 -0500 |
|---|---|---|
| committer | James N <james@jojojames.com> | 2021-01-28 23:44:33 -0800 |
| commit | a3aaa508f729e8962c090b8e8751afb92c43af6d (patch) | |
| tree | 1a53efeff5539675f115c00dcb3f327481888d61 /modes | |
| parent | 7a4f8085f3e1dc9c89b3bf3d1df1105cdaa1a42a (diff) | |
fix: Evil-collection inhibiting company popup
This update uses `evil-collection-company-supported-p` to handle the logic of
showing company completions when `evil-mode` is active/inactive and in a
supported buffer.
If applied, this commit will:
* Help `evil-collection` to determine supported states when `evil-mode` is active/inactive
* Fix the bug caused by `evil-collection-company-supported-p` where it inhibits company completions from showing due to not being in `evil-mode`
Diffstat (limited to 'modes')
| -rw-r--r-- | modes/company/evil-collection-company.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modes/company/evil-collection-company.el b/modes/company/evil-collection-company.el index 3eb8838..eae5c88 100644 --- a/modes/company/evil-collection-company.el +++ b/modes/company/evil-collection-company.el @@ -63,13 +63,10 @@ be set through custom or before evil-collection loads." "Return non-nil if `evil-state' is in supported states." (cond ((eq command 'prefix) - (memq evil-state evil-collection-company-supported-states)) + (or (and (bound-and-true-p evil-mode) (memq evil-state evil-collection-company-supported-states)) + (not (bound-and-true-p evil-mode)))) (t t))) -(defun evil-collection-company-popup () - "When `evil-mode' is active, make `company-mode' not show popup if not in supported state." - (advice-add 'company-call-backend :before-while 'evil-collection-company-supported-p)) - ;;;###autoload (defun evil-collection-company-setup () "Set up `evil' bindings for `company'." @@ -102,7 +99,7 @@ be set through custom or before evil-collection loads." (company-tng-configure-default))) ;; Make `company-mode' not show popup when not in supported state - (add-hook 'evil-mode-hook 'evil-collection-company-popup)) + (advice-add 'company-call-backend :before-while 'evil-collection-company-supported-p)) (provide 'evil-collection-company) |
