Friday, 27 September 2013

I can't configure "auto-complete" to use GTAGS

I can't configure "auto-complete" to use GTAGS

I have a similar structure for a C project
./project
./project/inc
./project/out
./project/asm
./project/src
I run "gtags -v" from Makefile in ./project thus producing 3 files GTAGS,
GRTAGS, GPATH in the same directory.
Now editing a C-file in .project/src I can use "gtag-find-tag", it works
fine finding files also in other directories.
While "auto-complete" don't use GTAGS even if "ac-source-gtags" is in
"ac-sources" list. How can I make "auto-complete" to use GTAGS?
This in my .emacs
(add-to-list 'load-path "~/.emacs.d/addons")
(require 'gtags)
(autoload 'gtags-mode "gtags" "" t)
(add-hook 'c-mode-hook '(lambda () (gtags-mode 1)))
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/addons/ac-dict")
(ac-config-default)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
Thanks.

No comments:

Post a Comment