Overhaul rcfiles; fast startup!
This commit is contained in:
parent
3231a145e7
commit
0b5c7add55
31 changed files with 940 additions and 819 deletions
47
init/init-ac.el
Normal file
47
init/init-ac.el
Normal file
|
@ -0,0 +1,47 @@
|
|||
(my/install-package 'auto-complete)
|
||||
|
||||
(use-package auto-complete
|
||||
:diminish auto-complete-mode
|
||||
:idle
|
||||
(progn (require 'auto-complete-config)
|
||||
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda()
|
||||
(add-to-list 'ac-sources 'ac-source-filename)
|
||||
(add-to-list 'ac-sources 'ac-source-files-in-current-dir)))
|
||||
|
||||
;; Use more vim-like keymappings
|
||||
(add-hook 'change-major-mode-hook
|
||||
(lambda () (imap ac-mode-map (kbd "C-SPC") 'auto-complete)))
|
||||
|
||||
;; (setq ac-auto-start 2)
|
||||
;; (setq ac-auto-show-menu nil ; Suggestions box must be invoked manually (see core-keymaps.el)
|
||||
;; ac-use-menu-map t ; Enable ac-menu-map map when menu is open
|
||||
;; ac-us-quick-help nil ; Don't show tooltips unless invoked (see core-keymaps.el)
|
||||
;; ac-fuzzy-cursor-color nil)
|
||||
|
||||
;; Keep auto-complete quiet until it's needed
|
||||
(setq ac-auto-start nil)
|
||||
|
||||
(ac-config-default)
|
||||
(ac-linum-workaround) ; Fix line number flux bug
|
||||
;; (ac-flyspell-workaround) ; Compatibility with flyspell/make
|
||||
)
|
||||
:config
|
||||
(progn (add-to-list 'ac-dictionary-files "~/.emacs.d/ac-dict/global")
|
||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
|
||||
|
||||
(imap ac-mode-map (kbd "C-S-SPC") 'auto-complete)
|
||||
(define-key ac-completing-map (kbd "<tab>") 'ac-expand)
|
||||
(define-key ac-completing-map (kbd "C-n") 'ac-next)
|
||||
(define-key ac-completing-map (kbd "C-p") 'ac-previous)
|
||||
(define-key ac-completing-map (kbd "<F1>") 'ac-quick-help)
|
||||
(define-key ac-completing-map (kbd "ESC") 'ac-stop)
|
||||
(define-key ac-completing-map [return] nil)
|
||||
|
||||
;; Tell ido not to care about case
|
||||
(setq completion-ignore-case t)
|
||||
))
|
||||
|
||||
;;
|
||||
(provide 'init-ac)
|
Loading…
Add table
Add a link
Reference in a new issue