1

I'm having some trouble trying to activate irony-mode.

So i followed the steps:

  1. My version of gcc is 5.3.0 so I installed -> clang 3.7.1
  2. I installed CMake
  3. Then irony from MELPA
  4. After that added this configuration to my init.el:

    (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)
    
  5. Then I was asked to install irony-server,so I did it.And....nothing!

What could be the problem?

lrleon
  • 103
  • 6
  • Can you please explain the problem in more detail. What does not work? Does `irony-mode` not turn on? Do the things in your `my-irony-mode-hook` not get effective? Above 2 things happen but something else does not happen? – Kaushal Modi Feb 18 '16 at 19:51
  • I wrote a demo project,i added (#include "myHeader.h"),and when i declare some objects it doesnt auto-complete methods and such... – Gabriel Răducan Feb 18 '16 at 19:54
  • And yes i have all files in the same folder. – Gabriel Răducan Feb 18 '16 at 19:58
  • Did you create a compilation database? Should be a JSON file in your project root. CMake can output them, otherwise Bear (Build EAR) is a good choice. – ChrisR Feb 18 '16 at 21:27

0 Answers0