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

New completer subcommands GetType and GetParent #88

Merged
merged 1 commit into from
Feb 17, 2015

Conversation

puremourning
Copy link
Member

GetType - returns the type of the word at a specific location. This is used by
YouCompleteMe and echo'd in vim. Where the canonical type (the "derived" type,
e.g. for a typedef) is different from the declared type, that is also returned,
separated with " => ".
GetParent - returns the semantic parent of the word at a specific location.
This is also echo'd in vim by YouCompleteMe.

One other change was required to satisty the cylomatic complexity check in the
test suite: the if:elif: pattern in OnUserCommand was changed to a pythonic
switch (a dictionary)

see also #87 for details and history.

return "Unknown type";

//
//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these two empty commented-out lines.

@Valloric
Copy link
Member

I added some more minor comments, but this is looking good!

GetType - returns the type of the word at a specific location. This is used by
YouCompleteMe and echo'd in vim. Where the canonical type (the "derived" type,
e.g. for a typedef) is different from the declared type, that is also returned,
separated with " => ".
GetParent - returns the semantic parent of the word at a specific location.
This is also echo'd in vim by YouCompleteMe.

One other change was required to satisty the cylomatic complexity check in the
test suite: the  if:elif: pattern in OnUserCommand was changed to a pythonic
switch (a dictionary)
@puremourning
Copy link
Member Author

Updated as a00fe22

@Valloric
Copy link
Member

Thanks again!

Valloric added a commit that referenced this pull request Feb 17, 2015
New completer subcommands GetType and GetParent
@Valloric Valloric merged commit 1ffdf02 into ycm-core:master Feb 17, 2015
@BatmanAoD
Copy link

This appears to require recompiling the support library, but I didn't get a notification when I ran "BundleUpdate"; is this a bug?

@puremourning
Copy link
Member Author

yes i think it might be. @Valloric how do you want to tackle this?

@BatmanAoD
Copy link

I am so excited to be at the bleeding edge of YCM functionality. :D

@Valloric
Copy link
Member

Valloric commented Mar 7, 2015

Ah, seems we forgot to bump the internal API version numbers. I'll get on it.

Valloric added a commit that referenced this pull request Mar 7, 2015
@Valloric
Copy link
Member

Valloric commented Mar 7, 2015

OK, updated both ycmd and YCM. The message about recompiling should show up after syncing now.

@puremourning puremourning deleted the add-subcommands branch March 19, 2015 18:21
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.

None yet

3 participants