I'm on Debian Jessie 8.5,GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5), and I installed irony-mode as the author said here:
irony-mode author's repository
I mean, I typed M-x package-install RET irony RET
. After that, I configured my ~/.emacs file like this:
(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode)
;; replace the `completion-at-point' and `complete-symbol' bindings in
;; irony-mode's buffers by irony-mode's function
(defun my-irony-mode-hook ()
(define-key irony-mode-map [remap completion-at-point]
'irony-completion-at-point-async)
(define-key irony-mode-map [remap complete-symbol]
'irony-completion-at-point-async))
(add-hook 'irony-mode-hook 'my-irony-mode-hook)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
After restarting Emacs, I opened a .cpp file, I typed M-x irony-install-server RET
, and it compiled perfectly. Then, I typed irony-cdb-autosetup-compile-options
, but irony doesn't work, when I try to call a function from a class included by its .h name, and I press TAB, nothing appears. And Irony mode is perfectly enabled.