diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2014-11-03 16:46:49 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2014-11-03 16:46:49 (GMT) |
| commit | 0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a (patch) | |
| tree | fcce63cb3cc2284970a56b14104732e6fc35360b /ravi-init-insertion.el | |
| parent | 5c1da46756e59301996f21cc8026ddb811cf7822 (diff) | |
| download | dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.zip dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.tar.gz dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.tar.bz2 | |
Start replacement of auto-complete with company-mode
Diffstat (limited to 'ravi-init-insertion.el')
| -rw-r--r-- | ravi-init-insertion.el | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/ravi-init-insertion.el b/ravi-init-insertion.el index 8c1e640..aea9cee 100644 --- a/ravi-init-insertion.el +++ b/ravi-init-insertion.el @@ -67,35 +67,28 @@ ) ) -;; Use smart-tab for TAB-completion but this means that we do not use TAB with auto-complete for now. -(use-package smart-tab - :init - (setq smart-tab-using-hippie-expand t) - :config - (global-smart-tab-mode 1) - :ensure t - :diminish smart-tab-mode - ) - -(use-package auto-complete - :diminish auto-complete-mode +(use-package company :init (progn - (use-package pos-tip :ensure t) - (use-package auto-complete-config) - (setq ac-comphist-file (ravi/emacs-file "past/ac-comphist.dat")) - (ac-config-default)) - + (add-hook 'after-init-hook 'global-company-mode)) :config (progn - (ac-set-trigger-key "<M-f7>") - (setq ac-use-menu-map t) - - ;(bind-key "A-M-?" 'ac-last-help) - ;(unbind-key "C-s" ac-completing-map) - ) - :ensure t - ) + (setq company-tooltip-flip-when-above t + company-idle-delay 0.1 + company-show-numbers t + company-tooltip-align-annotations t + company-require-match nil + company-minimum-prefix-length 2 + company-occurrence-weight-function 'company-occurrence-prefer-any-closest + company-dabbrev-downcase nil) + (defun ravi/complete-or-indent () + (interactive) + (if (company-manual-begin) + (company-complete-common) + (indent-according-to-mode))) + (bind-key "\t" 'ravi/complete-or-indent)) + + :ensure t) (provide 'ravi-init-insertion) ;;; ravi-init-insertion.el ends here |
