Open mbyio opened 5 years ago
You're exactly right, and I have a local branch where I'm working on exactly this using a proof of concept that we worked out last year. It turns out that you don't even actually need Go modules (e.g. in a go.mod
) for this. Here's my acceptance criteria if you want to work on it:
:GoUpdateBinaries
and :GoInstallBinaries
needs to continue to work so all the tools can be installed updated to avoid delays when the user tries to use a tool that would otherwise not be installed yet.go.mod
is not required, because vim-go is not a Go module.We actually have most of the code, but just need to organize it and make sure it works as expected.
Cool! I figured someone else had already thought of doing this. My plate is full currently, but I may have time next week. Is the existing code in a branch somewhere?
The code is in a stash on my local branch; it's not ready to be pushed any place yet.
Note this already exists in the form of gopher.vim. It works pretty well. Most of the code for it is in autoload/gopher/system.vim.
a static go.mod is not required, because vim-go is not a Go module.
The advantage of adding a go.mod is that you can use all the regular Go tooling. Want to update stuff? go get -u
, want to use a local copy? replace original => /path/to/replacement
, etc. etc. I'm not sure how else to do it without reinventing the wheel on all of this?
go.mod
isn't needed at all, because go get
will do just fine in module mode.
How do you record which version to use?
I wasn't sure if the issue template was appropriate for this. Filled it out anyway. This is a feature request - it would be nice if
vim-go
used go modules to manage the integrated tools. That way, it can use its own, consistent versions (or users can specify their own versions), andgo
will take care of keeping everything organized. People wouldn't have to run:GoInstallBinaries
or:GoUpdateBinaries
anymore either, because Go would download the right ones automatically when they are asked for. I can help implement if it sounds interesting.