2014-09-05 17:08:40 -04:00
|
|
|
(provide 'init-ac)
|
|
|
|
|
|
|
|
;;
|
2014-08-29 22:37:25 -04:00
|
|
|
(use-package auto-complete
|
2014-08-07 18:35:22 -04:00
|
|
|
:diminish auto-complete-mode
|
2014-08-07 23:34:45 -04:00
|
|
|
:init
|
2014-08-09 19:25:06 -04:00
|
|
|
(progn
|
|
|
|
(require 'auto-complete-config)
|
|
|
|
|
2014-09-30 16:35:53 -04:00
|
|
|
(setq ac-auto-start t
|
2014-09-20 16:54:04 -04:00
|
|
|
ac-auto-show-menu t ; Suggestions box must be invoked manually (see core-keymaps.el)
|
2014-08-09 19:25:06 -04:00
|
|
|
ac-use-menu-map t ; Enable ac-menu-map map when menu is open
|
2014-09-30 16:35:53 -04:00
|
|
|
ac-use-quick-help t ; Don't show tooltips unless invoked (see core-keymaps.el)
|
2014-08-09 19:25:06 -04:00
|
|
|
ac-use-fuzzy nil
|
|
|
|
ac-candidate-limit 25)
|
2014-09-20 16:54:04 -04:00
|
|
|
(setq ac-comphist-file (concat *tmp-dir "ac-comphist.dat"))
|
2014-08-09 19:25:06 -04:00
|
|
|
|
|
|
|
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
|
|
|
|
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
|
|
|
|
(add-hook 'css-mode-hook 'ac-css-mode-setup)
|
2014-09-05 17:08:40 -04:00
|
|
|
(add-hook 'shell-script-mode-hook 'ac-add-files)
|
2014-08-09 19:25:06 -04:00
|
|
|
;; (add-hook 'auto-complete-mode-hook 'ac-common-setup)
|
2014-09-20 16:54:04 -04:00
|
|
|
(global-auto-complete-mode t))
|
2014-08-07 18:35:22 -04:00
|
|
|
:config
|
2014-08-09 19:25:06 -04:00
|
|
|
(progn
|
2014-09-05 17:08:40 -04:00
|
|
|
(add-to-list 'ac-dictionary-files (expand-file-name "global" *ac-dicts-dir))
|
|
|
|
(add-to-list 'ac-dictionary-directories *ac-dicts-dir)
|
2014-09-05 21:56:19 -04:00
|
|
|
(add-to-list 'ac-modes 'nxml-mode)
|
2014-08-09 19:25:06 -04:00
|
|
|
|
|
|
|
;; Tell ido not to care about case
|
2014-08-21 03:33:30 -04:00
|
|
|
(setq completion-ignore-case t)))
|