[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fe20376 11/78: company-tng: Function to give sensible defa
From: |
Dmitry Gutov |
Subject: |
[elpa] master fe20376 11/78: company-tng: Function to give sensible default configuration |
Date: |
Sun, 18 Feb 2018 07:40:12 -0500 (EST) |
branch: master
commit fe203762f78c163001b76f1a91ff8ce56079f88d
Author: Nikita Leshenko <address@hidden>
Commit: Nikita Leshenko <address@hidden>
company-tng: Function to give sensible default configuration
This is done to ease adoption by new users
---
company-tng.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/company-tng.el b/company-tng.el
index f01462c..ab22924 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -73,6 +73,18 @@ confirm the selection and finish the completion."
(company--unread-this-command-keys)
(setq this-command 'company-complete-selection)))))
+;;;###autoload
+(defun company-tng-configure-default ()
+ "Applies the default configuration to enable company-tng."
+ (add-to-list 'company-frontends 'company-tng-frontend)
+ (let ((keymap company-active-map))
+ (define-key keymap [return] nil)
+ (define-key keymap (kbd "RET") nil)
+ (define-key keymap [tab] 'company-select-next)
+ (define-key keymap (kbd "TAB") 'company-select-next)
+ (define-key keymap [backtab] 'company-select-previous)
+ (define-key keymap (kbd "S-TAB") 'company-select-previous)))
+
(defun company-tng--allow-unselected (&optional arg)
"Advice `company-select-next' to allow for an 'unselected'
state. Unselected means that no user interaction took place on the
- [elpa] master updated (32f6323 -> e65aa3f), Dmitry Gutov, 2018/02/18
- [elpa] master c280e64 01/78: company-safe-substring: Honor the current buffer-invisibility-spec, Dmitry Gutov, 2018/02/18
- [elpa] master ff295e8 02/78: add golang keywords, Dmitry Gutov, 2018/02/18
- [elpa] master ab2937a 04/78: Fix the warnings, Dmitry Gutov, 2018/02/18
- [elpa] master aefac09 05/78: Force the prefix call to synchronous everywhere, Dmitry Gutov, 2018/02/18
- [elpa] master 191fc01 03/78: Merge pull request #694 from ycz0926/master, Dmitry Gutov, 2018/02/18
- [elpa] master 5df6abf 12/78: company-tng: Usage instructions, Dmitry Gutov, 2018/02/18
- [elpa] master ec1e879 10/78: company-tng: Don't highlight tooltip when unselected, Dmitry Gutov, 2018/02/18
- [elpa] master 91fc865 07/78: Unread whole command instead of last input, Dmitry Gutov, 2018/02/18
- [elpa] master c0098af 06/78: Introduce company-tooltip-maximum-width, Dmitry Gutov, 2018/02/18
- [elpa] master fe20376 11/78: company-tng: Function to give sensible default configuration,
Dmitry Gutov <=
- [elpa] master e27f0f4 13/78: NEWS: Entry for company-tng, Dmitry Gutov, 2018/02/18
- [elpa] master 0295c8f 20/78: And more, Dmitry Gutov, 2018/02/18
- [elpa] master b07eaf9 17/78: Move the entry up, Dmitry Gutov, 2018/02/18
- [elpa] master 74d85d1 09/78: company-tng: Advice company-select-next to allow unselected state, Dmitry Gutov, 2018/02/18
- [elpa] master 4240367 08/78: company-tng: Implement visualisation and completion, Dmitry Gutov, 2018/02/18
- [elpa] master 1a9f0b8 14/78: company-tng: Kill local overlay variable after completion is done, Dmitry Gutov, 2018/02/18
- [elpa] master a528433 21/78: Fix the link text, Dmitry Gutov, 2018/02/18
- [elpa] master 66a9e65 15/78: company-tng: Use 'after-string when the prefix is empty, Dmitry Gutov, 2018/02/18
- [elpa] master 44b19b6 19/78: Tweak some more, Dmitry Gutov, 2018/02/18
- [elpa] master afa592d 18/78: Rewrite the tng documentation a bit, Dmitry Gutov, 2018/02/18