Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display brief comments in preview window #199

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gribozavr
Copy link

This change uses the new Clang documentation support to extract brief comments. This requires updating libclang.py to the latest version.

Partially fixes issue #174.

This requires updating libclang.py to the latest version.
This is done by serializing the whole completion result data structure
in a vim-compatible way instead of relying on python and vim
representation being somewhat compatible.
Two approaches:
* optimize string concatenation;
* do a special conversion only if it is needed.
The issue is that we were calling clang_getCompletionBriefComment
unconditionally.  New we check if this function is available before
calling it.
@gribozavr
Copy link
Author

Hi Tobias,

I have pushed a few commits that should address your comments.

@awlosnie
Copy link

Will the brief comments from clang binary also be supported in clang_complete (for g:clang_use_library = 0)? I've found that there is a new -code-completion-brief-comments parameter in the source code of the clang frontend executable (but not yet available in release 3.1 for mingw).

@tobiasgrosser
Copy link
Collaborator

@awlosnie: I would personally prefer to remove support for the clang binary completely. What is the reason you can not use libclang?

@gribozavr: I just created a pull request (#213) that updates clang_complete to the latest version of cindex.py. This request also adds support for brief comments. Would you mind rebasing your patchset on top of this pull request. I would like to get this feature into clang_complete.

@awlosnie
Copy link

@TobiG: Thank you for your answer. I had a problem to configure it right in windows in gvim, so my solution was based on the executable version of clang. After your post I tested it ones again and now it seams to work with the libclang.dll (I just had to rename clang.dll to libclang.dll).

@tobiasgrosser
Copy link
Collaborator

On 11/19/2012 10:40 AM, awlosnie wrote:

@TobiG https://github.com/tobig: Thank you for your answer. I had a
problem to configure it right in windows in gvim, so my solution was
based on the executable version of clang. After your post I tested it
ones again and now it seams to work with the libclang.dll (I just had to
rename clang.dll to libclang.dll).


Reply to this email directly or view it on GitHub
#199 (comment).

@awlosnie: Great!

Tobi

@jstasiak
Copy link

+1 for this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants