Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request

jstaursky opened this issue · comments

Can you make a lisp variable so that the user can set it in emacs to their system includes path and irony will start indexing those system headers that match those listed in the currently open file?

I know you can setup compilation database, set clang-additional-options, etc. but its sort of a pain to do that every time; it would be nice if indexing happened automatically in certain directories. ccls does this but I found it too heavy otherwise.

I wonder if it would be better to do this per-project with a .dir-locals.el ?
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

Well my point is that the need to specify paths for everything is sort of tedious, especially when I just want to write something short to experiment with a library I just installed or something quick. So the hope is that by specifying the system include path, irony could then intelligently search what you need from your includes. Custom installations or libs requiring finer granularity could then be setup with a .clang-complete file if necessary. The .dir-locals idea would just push the problem somewhere else.

If you want indexing, I would recommend clangd + an lsp package like eglot, or ccls.
There is no point implementing a poor indexing in irony-mode, when clangd, rtags, ccls, cquery already implemented it.