Sarcasm / company-irony

company-mode completion back-end for irony-mode
119 stars 11 forks source link

parser, completion, format #10

Open dzhwinter opened 9 years ago

dzhwinter commented 9 years ago

Thanks for this awesome tool first. i'm looking for the completion tool who can complete the inherit associate between class. I have install company-mode ,irony-mode chenbin's cpputil-cmake. But it seems mess in my configuration. my setup for irony-mode and company-irony-mode as your README: (add-hook 'c++-mode-hook 'irony-mode) (add-hook 'c-mode-hook 'irony-mode) (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)

then i install irony-server in my emacs. set my company-backends with company-irony

Here is my three question;

  1. company-irony sometimes conflict with company-c-headers? in my config,
    ;; use for irony mode (add-to-list 'company-backends 'company-irony) (add-to-list 'company-backends 'company-c-headers) only this order works well.
  2. irony-mode set the tab and indentation for all modes? how to change it?
  3. add third party completion arguments with 'company-clang-arguments' ? I set it in my .dir-local.el, but no magic happen.

How to fix it? thanks advance

Sarcasm commented 9 years ago

i'm looking for the completion tool who can complete the inherit associate between class.

What does it mean?

To answer your questions:

  1. I already hear about this conflict, looking for company-c-headers in issues should give you an explanation. See https://github.com/Sarcasm/company-irony/issues/7#issuecomment-87453823
  2. Irony doesn't set tab and indentation, something else is modifying it.
  3. Irony mode uses a compilation database for the compile options, look up the README. You could create a simple compilation database that returns the compile option from a .dir-locals.el, but I doubt that's you want.