Closed hotpxl closed 9 years ago
Please take a look at issue #7.
Let me know if that helps.
I think it makes sense to group company-irony
with some others. Strangely YouCompleteMe has this feature of completing include files (-I
compiler flags take effect). I wonder why irony
doesn't do this, since both use clang
as backend.
company-files
and company-c-headers
don't automatically read .clang_complete
file and set search path. I expect irony-mode
to have included this feature.
It is planed, but this is not something that the libclang API helps with, so this has to be implemented in some other ways.
I think it's quite crucial and also doable. Do you have any timeline to finish it?
I have no timeline but I welcome contributions. :)
i'm thinking of borrowing company-files
code, i can compute a bunch of user provided include dirs. i can invoke clang
to give me a bunch of system include dirs. then i could give user a list of candidates. but i need parts that the user has already input. i wonder how it will integrate into current irony code. i have not written elisp before (nor any lisp dialect). but i also don't see any point integrating it into the cpp server.
For reference, I used to have some code for header completion https://github.com/Sarcasm/irony-mode/blob/v0.0.1-alpha/elisp/irony-pp.el
Hi. I wrote company-irony-c-headers that's supposed to work with irony-mode
to provide header completion. I copied and modified code from company-c-headers
and put things together. This is just informative and it would be greatly appreciated if you help test it.
I will take a look, please remind me if you want more feedbacks.
Thank you for the comment. They are really useful! I have fixed them all. Comments are always welcomed.
Also, since I depend on irony--compile-options
and irony--working-directory
, it would be great if you intend to make it stable and public.
Another question. company-irony
doesn't work when there is no .clang_complete
file nor compilation database. It doesn't complete either according to C nor C++. But it does show some completion candidates. I wonder what it is doing on this condition.
Also, since I depend on irony--compile-options and irony--working-directory, it would be great if you intend to make it stable and public.
I'm not ready to make such commitment, I planed some changes in the compilation database stuff (that's why I'm holding the release of a new version).
Another question. company-irony doesn't work when there is no .clang_complete file nor compilation database. It doesn't complete either according to C nor C++. But it does show some completion candidates. I wonder what it is doing on this condition.
It is a difficult thing to detect that it is not intentional that there is no compile options. And for libclang it is difficult to differentiate between missing compile options and incomplete buffer, libclang will try to complete stuff on incomplete code (completion is always in incomplete code so that make sense).
What helps the user IMHO, is to have something like flycheck. When you see that the includes aren't found, it is often the sign that the header search paths / compile options aren't properly configured.
For command
prefix
, I noticed thatstop
is returned when no match is found, causing subsequent backends to stop working. There are situations like#include "./
when I want another backend (likecompany-files
) to work alongside to help completion. Is there any reason tostop
all other backends?