m-pilia / vim-ccls

Vim plugin for the ccls language server
MIT License
97 stars 7 forks source link

Add call hierarchy for member variables, enums and so on, like what eclipse does #36

Open simonjoylet opened 4 years ago

simonjoylet commented 4 years ago

May be it can be done like this:

  1. get all reference
  2. get functions in the references
  3. get function hierarchy

Since step 1 and step 3 are already available, only step 2 need some work to finish.

m-pilia commented 3 years ago

Hi @simonjoylet! Could you please show an example of what type of result you would like for step 2? (Maybe a screenshot from Eclipse showing the feature you desire).

simonjoylet commented 3 years ago

image @m-pilia Thank you for reply. I post an example of leveldb code. Eclipse showed the call hierarchy of member start of struct range in db.h

m-pilia commented 3 years ago

Thanks for the information @simonjoylet. The hierarchy can be improved and I will look into this.

pidgeon777 commented 2 years ago

This would be an extremely good feature. I really hope it will be implemented.

So, something as this:

  1. I place cursor on any symbol.
  2. I press a key.
  3. A treeview popup appears, showing all of the references of this symbol, grouped in functions where those symbols are referenced.
  4. Optionally, with a setting, those function groups could also be grouped in the functions which call them, recursively (so one would expect the final root symbol to be main).