diff options
author | gxlin <[email protected]> | 2021-02-20 21:38:52 +0800 |
---|---|---|
committer | gxlin <[email protected]> | 2021-02-20 21:38:52 +0800 |
commit | d49aebd7563898c3434141e25596ed7979583e2a (patch) | |
tree | aa88cad6bc640bf3e8cd568dc4cd7acf6ff26bc2 | |
parent | 727b304c7e5dbf51a9ded004283fa90e09f63a76 (diff) | |
download | dotfiles-d49aebd7563898c3434141e25596ed7979583e2a.tar.gz dotfiles-d49aebd7563898c3434141e25596ed7979583e2a.tar.bz2 dotfiles-d49aebd7563898c3434141e25596ed7979583e2a.zip |
Add auto-complete to emacs
-rw-r--r-- | .emacs.d/init.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e5b4ee1..06d135a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2,21 +2,14 @@ (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) +(package-initialize) -(when (version<= "26.0.50" emacs-version) - (global-display-line-numbers-mode)) - -;; Evil -(unless (package-installed-p 'evil) - (package-install 'evil)) -(require 'evil) -(evil-mode 1) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(package-selected-packages '(ledger-mode evil))) + '(package-selected-packages '(auto-complete ledger-mode evil))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -24,6 +17,15 @@ ;; If there is more than one, they won't work right. ) +(when (version<= "26.0.50" emacs-version) + (global-display-line-numbers-mode)) + +;; Evil +(unless (package-installed-p 'evil) + (package-install 'evil)) +(require 'evil) +(evil-mode 1) + ;; Org Mode (add-hook 'org-mode-hook (lambda () (setq truncate-lines nil))) @@ -38,3 +40,9 @@ (setq-local completion-cycle-threshold t) (setq-local ledger-complete-in-steps t))) (setq ledger-highlight-xact-under-point nil) + +;; Auto-Complete +(unless (package-installed-p 'auto-complete) + (package-install 'auto-complete)) +(require 'auto-complete) +(ac-config-default) |