Run gogetdoc in the dir containing the file #2804
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My company keeps its
go
source in a subdir of the main git repo. I typically start vim in the root of the repo. When usingK
to view the documentation of a keyword in a go file, I get an error (output ofgogetdoc
) such as:If I
pushd go
and runvim
, the documentation displays as expected, but running vim in this way this complicates some of my non-go
editing and plugin setup.This pr fixes the issue by starting
gogetdoc
in the dir containing the open file, I presume by makinggo list
able to find the main module.Thanks!