summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordieggsy <diegoamundo@protonmail.com>2017-12-06 12:49:35 -0500
committerJames N <james@jojojames.com>2017-12-06 16:57:36 -0800
commit4992d5fb0fd310d73ddc8a8301120552eb9a136f (patch)
treed57635bb296392c06d8a4e62a798f303388351b3
parent77664b03ef2bbae4b95d01c3c5dd423778c9de15 (diff)
Make company-tng optional
Fixes #51
-rw-r--r--evil-company.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/evil-company.el b/evil-company.el
index 9e38093..068bc0c 100644
--- a/evil-company.el
+++ b/evil-company.el
@@ -30,6 +30,21 @@
(require 'company nil t)
(require 'evil)
+(defgroup evil-company nil
+ "Evil bindings for `company-mode'."
+ :group 'evil-collection)
+
+(defcustom evil-company-use-tng t
+ "Enable company-tng through `company-tng-configure-default'.
+
+This mirrors ycmd's behavior for a completion experience more
+similar to YouCompleteMe.
+
+Note that for changes to take effect, this variable may have to
+be set through custom or before evil-collection loads."
+ :group 'evil-company
+ :type 'boolean)
+
(defvar company-active-map)
(defvar company-search-map)
@@ -54,7 +69,8 @@
(define-key company-search-map (kbd "M-k") 'company-select-previous)
;; Sets up YCMD like behavior.
- (with-no-warnings (company-tng-configure-default)))
+ (when evil-company-use-tng
+ (with-no-warnings (company-tng-configure-default))))
(provide 'evil-company)
;;; evil-company.el ends here