From 57139c690dc8d594b2f9de8d1e609f2854a4fe45 Mon Sep 17 00:00:00 2001 From: Marcus Caisey Date: Wed, 13 Sep 2023 18:33:42 +0100 Subject: fix(gopls): prioritise go.work at root_dir --- lua/lspconfig/server_configurations/gopls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/gopls.lua b/lua/lspconfig/server_configurations/gopls.lua index f27033b7..1b922f3e 100644 --- a/lua/lspconfig/server_configurations/gopls.lua +++ b/lua/lspconfig/server_configurations/gopls.lua @@ -20,7 +20,7 @@ return { return clients[#clients].config.root_dir end end - return util.root_pattern('go.work', 'go.mod', '.git')(fname) + return util.root_pattern 'go.work'(fname) or util.root_pattern('go.mod', '.git')(fname) end, single_file_support = true, }, -- cgit v1.2.3-70-g09d2