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 | |
| parent | 5c1da46756e59301996f21cc8026ddb811cf7822 (diff) | |
| download | dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.zip dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.tar.gz dotemacs-0ab3bac82e50b8f1e3de0ab3f1d2510ac519dd7a.tar.bz2 | |
Start replacement of auto-complete with company-mode
| -rw-r--r-- | ravi-init-cpp.el | 3 | ||||
| -rw-r--r-- | ravi-init-insertion.el | 43 | ||||
| -rw-r--r-- | ravi-init-mu.el | 1 | ||||
| -rw-r--r-- | ravi-init-python.el | 2 | ||||
| -rw-r--r-- | ravi-init-tex.el | 9 |
5 files changed, 19 insertions, 39 deletions
diff --git a/ravi-init-cpp.el b/ravi-init-cpp.el index 3163b60..53d52ca 100644 --- a/ravi-init-cpp.el +++ b/ravi-init-cpp.el @@ -144,9 +144,6 @@ (bind-key "C-c p" 'insert-counting-printf c-mode-base-map) - ;(auto-complete-mode 1) - ;(bind-key "<A-tab>" 'ac-complete c-mode-base-map) - (doxymacs-mode 1) (doxymacs-font-lock) 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 diff --git a/ravi-init-mu.el b/ravi-init-mu.el index 7e74cda..2be3347 100644 --- a/ravi-init-mu.el +++ b/ravi-init-mu.el @@ -184,7 +184,6 @@ (setq gnus-dired-mail-mode 'mu4e-user-agent) (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) - (add-to-list 'smart-tab-disabled-major-modes 'mu4e-compose-mode) (imagemagick-register-types) ) ) diff --git a/ravi-init-python.el b/ravi-init-python.el index 29aae57..1ac8766 100644 --- a/ravi-init-python.el +++ b/ravi-init-python.el @@ -146,7 +146,7 @@ (add-hook 'python-mode-hook 'ravi/python-jedi-hook-installer) ) :ensure t - :disabled nil + :disabled t ; casualty of removing auto-complete ) (use-package sphinx-doc diff --git a/ravi-init-tex.el b/ravi-init-tex.el index 4bb9349..298de5d 100644 --- a/ravi-init-tex.el +++ b/ravi-init-tex.el @@ -43,10 +43,6 @@ ;; fix the "bug" in SP regexp wrap that treats ' as "word" (modify-syntax-entry ?' ".") - (use-package ac-math - :ensure t - ) - (require 'smartparens-latex) (sp-local-pair 'latex-mode "\\begin" "\\end") (sp-local-tag 'latex-mode "\\ba" "\\begin{align*}" "\\end{align*}") @@ -154,11 +150,6 @@ starting with \\ and followed by a block of text enclosed in {}." (setq fill-column 100000) - (setq ac-sources - (append '(ac-source-math-unicode ac-source-math-latex ac-source-latex-commands) - ac-sources)) - (auto-complete-mode 1) - (message "LaTeX mode init complete.")) ;; ACUTeX replaces latex-mode-hook with LaTeX-mode-hook (add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-init) |
