-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support Go modules #1906
Comments
+1 But I think this plugin is hard to support the Go modules, at least not until golang/go#24661 is fixed. |
At minimum things like syntax highlighting can be added for the go.mod and go.sum files. |
This adds initial support for the `go.mod` file. It adds the followings: * Syntax highligthing. We highlight keywords, strings, operator and semver version. It works pretty well for now. * Auto fmt on save. Command `:GoModFmt` or `Plug(go-mod-fmt)` for custom mappings Before we fully support the semantics of go.mod, I think this initially will be helpful because I discovered that `go.mod` is read and edited a lot. So going forward, this will make it easier experimenting with Go modules. related: #1906
Added initial support for |
This adds initial support for the `go.mod` file. It adds the followings: * Syntax highligthing. We highlight keywords, strings, operator and semver version. It works pretty well for now. * Auto fmt on save. Command `:GoModFmt` or `Plug(go-mod-fmt)` for custom mappings Before we fully support the semantics of go.mod, I think this initially will be helpful because I discovered that `go.mod` is read and edited a lot. So going forward, this will make it easier experimenting with Go modules. related: #1906
Is it expected that things like auto fmt (and go imports) on save doesn't work outside of GOPATH? |
@rkuska no, |
Sorry for the noise, I had |
|
It's not because of modules, it's just Go 1.11 removed this functionality from |
Some related discussion in PR #1988, including #1988 (comment) and #1988 (comment) Also some discussion in #2137, including:
|
it looks like there are some issues with the current |
vim-go has good support from modules now. I'm closing this; any remaining gaps should be filed as separate issues. |
@bhcleek This is great! Is there a thought around publishing a new official release? Most recent official release was November, I think. |
And... looks like I should have waited slightly longer prior to asking about a new release... ;-) |
Hi Folks, How can I make Also I hit following error for a project (it is a large project/module with over 100MB of source in multiple packages). Code completion and navigation works as expected for other smaller projects. Is this setting configurable? |
Sorry to ask in a closed issue but my |
To support Go 1.11 fully, vim-go changes need to be made to handle module mode development.
go.mod
:GoImport
tab completion (GoImport autocomplete not working in go mod project #2212)Obviously, vim-go will be dependent on a number of tools getting updated to complete the support, but there are a number of changes that will need to be made to vim-go itself.
The text was updated successfully, but these errors were encountered: