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?

4
  • 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? 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... Feb 18 '16 at 19:54
  • And yes i have all files in the same folder. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.