diff options
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 |
