Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
906 stars 99 forks source link

clang_getCursorReferenced and clang_getCursorDefinition for jumping to declaration/definition #384

Open ikirill opened 7 years ago

ikirill commented 7 years ago

Since emacs has xref, it would be quite nice to expose clang_getCursorReferenced and clang_getCursorDefinition, so that xref-find-definitions could be made to work with irony-mode. So you could jump to definition/declaration of whatever is under point. Are there any plans for this in irony-mode? Would you be interested in a PR?

(Plus, there's also xref-find-references, which is separate, but would also be nice.)

Sarcasm commented 7 years ago

Yes, very much interested in a PR, and in using it. :) irony-server won't be an a good indexer but for local stuff, jumping to the declaration of a function, it is a nice feature.