How to get C++ function descriptions using Company?

Forgive me if this isn't a feature which is easily available through some emacs package. I'm using Emacs for C++ development with Company, RTags, and Irony. When choosing a company completion candidate, I would like a description of what the candidate (presumably function) actually does; either in pos-tip or in a new buffer, it doesn't really matter.

1
2
  std::string my_string;
    my_string.push_back


I would expect a buffer or pos-tip to display a description of what the member function push_back actually does, e.g., the description which can be found at http://www.cplusplus.com/reference/string/string/push_back/ Currently, the best I can get is a description of the argument types that push_back expects. https://www.myprepaidbalance.me/

Thanks for taking the time to help.
Last edited on
I don't know of any IDE that has full text of built in library functions.
Most offer the parameters expected, as you see already. They expect that if you need more than a parameter hint, you will open some documentation yourself.

You could make notepad++ do this but you would have to develop the plug in to do it. Other IDE support plug ins as well, but I have not really played with any of it in a very long time.
Last edited on
I would expect a buffer or pos-tip to display a description of what the member function push_back actually does

That would be awesome, but I have no idea of what IDE does that.

However, in Qt Creator you can add your own documentation.
For example, you can download the qch file from here
https://en.cppreference.com/w/Cppreference:Archives
and add it to the IDE.

Once done, when you press F1 on the word ‘string’, on the right a side panel will open and show you the equivalent of this page:
https://en.cppreference.com/w/cpp/string

The usage is pretty intuitive, but the first time you need to switch to the “Help mode” because the new documentation needs to be indexed.
I don't know of any IDE that has full text of built in library functions.

Visual Studio does. If you select a standard library function/class and hit F1, it displays online documentation from the Microsoft website. It's not perfect - it mis-identified std::move, for example - but it can be helpful for those who find typing something into a search engine too onerous a task.
Topic archived. No new replies allowed.