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

attempt to resolve import statement in normal mode #2

Merged
merged 1 commit into from May 7, 2022

Conversation

Songmu
Copy link
Contributor

@Songmu Songmu commented May 7, 2022

Hello. Thank you for providing a great plugin. I use it conveniently in my Go development.

This pull request is with feature suggestions. Feel free to reject it if it is not to your liking.

I created this patch because I wanted to immediately resolve that package name in import statements like import "github.com/path/to/pkg." Of course, I know there is a way to select in visual mode and then pull godoc. But I thought it would be more convenient to be able to open the package documentation right from normal mode.

What do you think?

@obcat
Copy link
Owner

obcat commented May 7, 2022

Hello. Thank you for your request, it looks very useful!
It would be better if there is a check that the double-quoted string is a component of an import statement.
Is it possible to add such a check?

@Songmu
Copy link
Contributor Author

Songmu commented May 7, 2022

It certainly seems convenient to be able to do that much. However, since import statements can span multiple lines, checking them seems a bit difficult with my vim scripting skills...
Any advice? Or is it realistically practical to leave it as is?

@obcat
Copy link
Owner

obcat commented May 7, 2022

import statements can span multiple lines

Right, maybe covering all case is not easy...
Let me merge as-is and see if there are any problems.
Thank you for your contribution!

@obcat obcat merged commit 388408d into obcat:main May 7, 2022
@Songmu Songmu deleted the import-doc branch May 7, 2022 16:54
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

2 participants