Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (require 'auto-complete)
- (require 'auto-complete-config)
- (ac-config-default)
- ;; Function which initializes auto-complete-c-headers and gets called for
- ;; c/c++ hooks
- (defun my:ac-c-header-init ()
- (add-to-list 'ac-sources 'ac-source-c-headers)
- ;; List of directories where c/c++ headers are located. This list
- ;; may change from machine to machine. Type the following command
- ;; in a terminal to see your list:
- ;;
- ;; >> gcc -xc++ -E -v -
- ;;
- ;; and add whatever paths come after '#include <...> search starts here:'.
- ;;
- (setq achead:include-directories
- (append '("/usr/include/c++/5"
- "/usr/include/x86_64-linux-gnu/c++/5"
- "/usr/include/c++/5/backward"
- "/usr/lib/gcc/x86_64-linux-gnu/5/include"
- "/usr/local/include"
- "/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"
- "/usr/include/x86_64-linux-gnu")
- achead:include-directories)))
- ;; Call this function from c/c++ hooks
- (add-hook 'c++-mode-hook 'my:ac-c-header-init)
- (add-hook 'c-mode-hook 'my:ac-c-header-init)
Add Comment
Please, Sign In to add comment