From 4e3b2b1971bd7dcf23f729420f479c7104a80c8c Mon Sep 17 00:00:00 2001 From: ray-x Date: Mon, 31 Jan 2022 21:40:40 +1100 Subject: [PATCH] bugfix #81 --- lua/go/gopls.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/go/gopls.lua b/lua/go/gopls.lua index df9b943..9190aec 100644 --- a/lua/go/gopls.lua +++ b/lua/go/gopls.lua @@ -75,8 +75,8 @@ end function M.version() local cache_dir = vim.fn.stdpath("cache") local path = string.format("%s%sversion.txt", cache_dir, utils.sep()) - local gopls = _GO_NVIM_CFG.gopls_cmd or "gopls" - vim.fn.jobstart({ gopls, "version" }, { + local gopls = _GO_NVIM_CFG.gopls_cmd or { "gopls" } + vim.fn.jobstart({ gopls[1], "version" }, { on_stdout = function(c, data, name) local msg = "" if type(data) == "table" and #data > 0 then @@ -105,7 +105,7 @@ function M.version() local f = io.open(path, "r") if f == nil then - local version_cmd = gopls .. " version" + local version_cmd = gopls[1] .. " version" return vim.fn.system(version_cmd):match("%s+v([%d%.]+)%s+") end local version = f:read("*l")