Closed danielrs closed 1 year ago
I noticed that when you open a file with no build tags, the buildFlags setting for gopls gets overwritten with nil tags, ignoring even whatever you have in your .gonvim/init.lua. The problem seems to be this part: https://github.com/ray-x/go.nvim/blob/d7530aea0f1086d10e9267287966702616c366af/lua/go/gopls.lua#L298-L301 When the function get_build_tags returns nil, the condition nil ~= '' will always evaluate to true.
buildFlags
gopls
nil
.gonvim/init.lua
get_build_tags
nil ~= ''
true
Already working on a PR to fix this.
thanks!
I noticed that when you open a file with no build tags, the
buildFlags
setting forgopls
gets overwritten withnil
tags, ignoring even whatever you have in your.gonvim/init.lua
. The problem seems to be this part: https://github.com/ray-x/go.nvim/blob/d7530aea0f1086d10e9267287966702616c366af/lua/go/gopls.lua#L298-L301 When the functionget_build_tags
returnsnil
, the conditionnil ~= ''
will always evaluate totrue
.Already working on a PR to fix this.