fix: only check Go version when building the server#572
Open
snejugal wants to merge 7 commits into
Open
Conversation
jakubbortlik
reviewed
Jul 1, 2026
jakubbortlik
reviewed
Jul 3, 2026
jakubbortlik
reviewed
Jul 8, 2026
| end | ||
|
|
||
| local go_version = vim.version.parse(go:wait().stdout, { strict = false }) | ||
| return go_version ~= nil and vim.version.ge(go_version, { 1, 25, 0 }) |
Collaborator
There was a problem hiding this comment.
@snejugal Could you please update the version to 1.25.1 - this is the actual version in
go.mod. Ideally, I'd like to see the version pulled out to a variable and used in the return value of check_go_version as well, so that they don't drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I use NixOS and prefer to keep my environment clean. As such, I prebuilt the plugin's server binary using Nix and specified its path in
setup. However,setupforcibly checks Go version and aborts if I don't have it installed, which doesn't make sense because Go is only required to build the server and I already have one. Thus I moved the check toserver.buildfunction when it actually needs to build the server. I also touchedversion.luato remove the annoyinggo: command not foundmessage when starting Neovim (I'm not sure if this is a good way to fix it since I'm not a Lua programmer, so I'm open to suggestions).