[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configuring irony
From: |
John Mastro |
Subject: |
Re: configuring irony |
Date: |
Mon, 12 Oct 2015 13:01:27 -0700 |
Sanjeev Sariya <sanjeevsariya@gmail.com> wrote:
> Hi Emacs Users,
>
> Apologies if this a naive query. I'm new to emacs world, and have been
> trying to learn how to set up config in .emacs/init.el file for irony
> package. I've installed/downloaded irony, company-irony, added their
> path to my .emacs file, yet they don't work.
>
> https://github.com/Sarcasm/irony-mode
>
> My .emacs file look like:
>
> (add-to-list 'load-path
> "/Users/sariyasanjeev/.emacs.d/elpa/irony-20150831.144/")
> (load "irony.el")
> (require 'irony)
> (add-hook 'c++-mode-hook 'irony-mode)
> (add-hook 'c-mode-hook 'irony-mode)
> (add-hook 'objc-mode-hook 'irony-mode)
>
> (add-to-list 'load-path
> "/Users/sariyasanjeev/.emacs.d/elpa/company-irony-20150810.239/")
> (eval-after-load 'company
> '(add-to-list 'company-backends 'company-irony))
>
> How do I enable these? Emacs -version 24.5.1 GNU, OSX, 10.9
> Please help me.
Here are a few things I noticed:
- Those (add-to-list 'load-path ...) forms shouldn't be necessary and I
would recommend removing them. That's part of what package.el handles
for you.
- I also suspect that (load "irony.el") is unnecessary
- You should add this to your init file if not already present:
(add-hook 'after-init-hook #'global-company-mode)
- The irony-mode README mentions that it requires an external program,
irony-server, which requires CMake and libclang. Have you confirmed
those are installed and working?
- In a later message, you mentioned attempting to invoke completion by
hitting tab after typing some characters. However, that's not how
company-mode is generally used. Instead, it automatically begins
completion after you type a specified number of characters (see
company-minimum-prefix-length).
Hope that helps
--
john