Closed hongxuchen closed 9 years ago
Hi, FYI I'm aware of the issue but since there are a lot of points I need some time to check it out (during the week-end hopefully).
To quickly clarify some of your concerns:
10.
, I will be glad to have such pluginMany thanks for your reply. I realize that you have noticed most of these issues, and this is just a reminder:-)
.dir-locals
, it complains much less when I remove all the flags related directory local variables and only use .clang_complation
; but unfortunately, problems still exist. 7.
, what I need irony to complete is __func__
. 10.
, I later found that there are quite a lot of bugs in my code(for instance, fail to find the macro expansion for symbols such as assert
, which may result from pch); also, the async mechnism seems not suitable for it(it might not respond or use the previous request information, sometimes the fiter
even fail to work thus buffer *Irony*
is inserted with the response). So I think it is still immature to be added into irony(due to my poor C++ programming experience...)Also, I think rtags can do all the symbol lookup work I need as long as the source code is indexed by it, so I think it is superior.
But rtags really has poor code completion support, in which irony-mode has overwhelmingly advantage.
c
you will have a prompt asking for the directory (that can be outside of the root directory of the project). The uppercase is just a shortcut that will use the default value written next to the option [with root=...]
(logged as #53)..clang_complete
. I will add this thank you (committed as 6f3e7bb). Hopefully this can be improved outside of the README by #53, it's better if everything is obvious and self-documenting..dir-locals
can you be more explicit about the issue? Do you have the same file content as here or https://github.com/Sarcasm/irony-mode/blob/develop/.dir-locals.el or are you talking about passing the flag irony-compile-flags-work-dir
and irony-compile-flags
as written in the README? I may need to check the latter since I'm not using this maybe it's a bit broken.7.
, thanks for the clarification, I'm able to reproduce the issue so I will try to work it out.10.
I will accept such a plugin but I will review the code before integrating it into irony-mode. I would like to have something to navigate easily but I haven't found the "ultimate" solution. I think the big part of the indexing can (should?) be done by an external program. But irony-mode
can come in handy at updating the files that are being editedYeah I looked at rtags a few times (not that much recently) but it seems difficult to integrate with irony at the time. Last time I checked they seemed to have a nice way of handling code navigation I totally agree.
Oups I forgot to say, don't hesitate to make different issues as it's simpler for me to manage them and to keep track of what has to be done.
1.
, I think It would be better if the flags settings are stored across sessions, but it may not be of the highest priority currently. 2. & 3.
Oops, I didn't realize that, sorry! 4.
Presently I cannot add an example for it. I only remember about three days ago(after I remove all .dir-locals.el
) and I saw an error message in the log file about "xxx undefined", which I'm sure is defined in one of the system header files(and I actually put the system search path into .clang_complete
). I will ask for your advice if I come across this problem next time. irony-compile-flags
into .dir-locals.el
several days before. The problem is that the directory local variables are evaluated during normal-mode
, and I find the flags are not properly set(it seems that the directory/file locals variables settings sometimes sucks in Emacs, or at least it is not easy to let it work properly). Now I only configure flags with cmake
/compilation DB
/.clang_complete
(I use .dir-locals.el
since I was using auto-complete-clang before). Closing this.
Hi Guillaume, thanks so much for providing this wonderful tool for C++ programming in Emacs.
However I think there still can be some improvements:
irony-compile-flags
is usually not set right when explicit flag is a necessity. It seems that there is always a need to runC-c C-b
manually each time I load a project, which is a bit annoying. I think there need to be a choice(or simply loads it) when irony detects some flags related files(cmake, json compilation database, .clang_complete or .dir-locals).irony-cdb
settings forcmake
is a bit inflexible since the build directory has to be put inside the root directory of the project(for instance,irony-build
directory has to be put insideirony-mode
)..clang_compilation
have a limitation that each flag should occupy one line. Although it is a good habit to be written like this, but I think the docs should include this detail.irony-compile-flags
, and it seems that irony has not included yet. Also I find that there are some problems whenirony-compile-flags
also include those system headers, however without them irony complains there are errors as well.ffap-c-path
for convenience(especially when due to some reasons irony detects errors and I have to lookup the header files to make sure it's not my fault), a hook after the cdb settings should be a direct solution.irony-compile-check
give so little information that I usually have to read the log file inside/tmp/
. And I think there is a need to include the diagnostics, too. And whenirony-compile-check
finds error, there is a choice that I can see what's going wrong(I simply add a line insideCompileCheck.cpp
to print the diagnostics information, it's really a dirty tweak; I think the right approach should be redirecting them to a special file). Also when there are onlywarnings
, there is no need to suggestC-c C-b
:-)puts(__fu|)
and the cursor now behindu
of__fu
(and it is in the snippet state),C-<RET>
would cause Emacs hanging there(I guess it is because there is no answer from the server side).(irony-enable 'flycheck)
, I have to change the name irony-flycheck.el to flycheck.el and change(provide 'irony-flycheck)
to (provide 'irony/flycheck). And since there is a general purposed Emacs extensionflycheck
with the same nameflycheck.el
, I think some modifications is needed./tmp/
? (Sorry that I am not so familiar with clang pch and emacs handling for process.)SymbolInfo
,cpp and elisp, based on cc-lookup(I wrote several days before) forirony-mode
(and I copy quite a lot of code from your well writtencompletion
plugin), but since I think it is still too simple(for instance, doxygen document features can be added). I hope you can give me some adivice whether it could be added into the main stream now(there are still some bugs which I think have relations with the temporary files inside/tmp/
since I really don't know the mechanism behind this).