lyuts / vim-rtags

Vim bindings for rtags, llvm/clang based c++ code indexer.
BSD 2-Clause "Simplified" License
282 stars 56 forks source link

Adds a call tree for viewing references to symbols #64

Closed flackr closed 6 years ago

flackr commented 7 years ago

The rF command is bound to a reference viewer which is capable of showing the call tree leading to a particular reference. Tree nodes can be expanded by pressing o and can be viewed by pressing return.

flackr commented 7 years ago

This is a little rough, since it's my first attempt at writing vimscript but I really wanted to be able to visualize the call tree when finding references and this does exactly that. I'd like to hide the index numbers added to the output but unless there's an easy way to conceal for a single buffer I think it will require keeping a correct map associating line numbers to the extra entry data.

lyuts commented 7 years ago

This is cool, I really like it. Could you update doc/rtags.txt with the new mapping and description of this functionality? Thank you very much for pr.

flackr commented 6 years ago

Sorry for the delay, I missed this message somehow. I've updated docs/rtags.txt with the mapping and a brief description of the functionality.

I'll try to put together another PR when I have some time to remove the reference numbers by using an array mapping from line number instead, but I've found this really useful even as is so I thought I'd share it :).

lyuts commented 6 years ago

I resolved the conflicts and pushed this change. Thank you.