-
Notifications
You must be signed in to change notification settings - Fork 770
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
Add support for extracting doc from comment #74
Conversation
a77e930
to
4f3a2c5
Compare
Thanks for the PR! You need to sign the Google CLA and state that you have (see CONTRIBUTING.md). |
@@ -21,6 +21,13 @@ | |||
#include <clang-c/Index.h> | |||
#include <string> | |||
|
|||
#if defined(CINDEX_VERSION_MAJOR) && defined(CINDEX_VERSION_MINOR) && \ | |||
(CINDEX_VERSION_MAJOR > 0 || CINDEX_VERSION_MINOR >= 6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ycmd requires libclang version >= 3.5 which is pretty recent. If that has CINDEX_VERSION_MINOR >= 6
, then you don't need this check and can just use this API without concern. A lot of the other code becomes simpler too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in libclang 3.5 the CINDEX_VERSION_MINOR
is 27. I will remove the checks.
Ok, I have signed the Google CLA. |
a48fcf8
to
4680c19
Compare
@@ -271,7 +271,8 @@ def ConvertCompletionData( completion_data ): | |||
menu_text = completion_data.MainCompletionText(), | |||
extra_menu_info = completion_data.ExtraMenuInfo(), | |||
kind = completion_data.kind_.name, | |||
detailed_info = completion_data.DetailedInfoForPreviewWindow() ) | |||
detailed_info = completion_data.DetailedInfoForPreviewWindow(), | |||
extra_data = { 'doc_string': completion_data.DocString() } ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Valloric Now we have always extra_data
even if completion_data.DocString()
returns an empty string. Would this be better?
extra_data = { 'doc_string': completion_data.DocString() } if completion_data.DocString() else None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, go with that.
4680c19
to
f5fd319
Compare
Thanks for the PR! For future reference, github doesn't send notifications to repo owners when you push new commits to a PR branch (longstanding github issue), so if you address my comments with new commits, you need to add some sort of issue comment for me to notice there have been updates. |
Add support for extracting doc from comment
Thanks for merging and also for the hint about github not sending notification when PR branch has new commits! |
Just realized this PR forgot to bump up the API version in |
Changes Unknown when pulling f5fd319 on ptrv:support-brief-comment into * on Valloric:master*. |
No description provided.