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

add :GoDefType #2165

Merged
merged 1 commit into from
Mar 13, 2019
Merged

add :GoDefType #2165

merged 1 commit into from
Mar 13, 2019

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Mar 13, 2019

Add a new function, :GoDefType, to jump to type definitions. Because
it relies on gopls, :GoDefType will only work in Vim8 and Neovim.

Add a new function, `:GoDefType`, to jump to type definitions. Because
it relies on gopls, `:GoDefType` will only work in Vim8 and Neovim.
@bhcleek bhcleek merged commit 0a24d13 into fatih:master Mar 13, 2019
@bhcleek bhcleek deleted the GoDefType branch March 13, 2019 04:38
bhcleek added a commit that referenced this pull request Mar 13, 2019
@fatih
Copy link
Owner

fatih commented Mar 13, 2019

What's the difference between :GoDef and :GoDefType? Wasn't :GoDef not jumping to type definition already? Maybe I'm missing something :)

@bhcleek
Copy link
Collaborator Author

bhcleek commented Mar 13, 2019

:GoDef will jump to the definition of the identifier under the cursor. When the identifier is a type, it jumps to the type declaration.

:GoDefType will jump to the type declaration of the identifier under the cursor, even when the identifier is a variable.

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.

2 participants