@@ -135,8 +135,6 @@ local custom_attach = function(client)
135135
136136 -- Set autocommands conditional on server_capabilities
137137 if client .server_capabilities .documentHighlightProvider then
138- P (client .server_capabilities .documentHighlightProvider )
139-
140138 vim .cmd [[
141139 augroup lsp_document_highlight
142140 autocmd! * <buffer>
@@ -279,15 +277,11 @@ local setup_server = function(server, config)
279277 lspconfig [server ].setup (config )
280278end
281279
282- for server , config in pairs (servers ) do
283- setup_server (server , config )
284- end
285-
286280if is_mac then
287281 local sumneko_cmd , sumneko_env = nil , nil
288282 require (" nvim-lsp-installer" ).setup {
289283 automatic_installation = false ,
290- ensure_installed = { " sumneko_lua" },
284+ ensure_installed = { " sumneko_lua" , " gopls " },
291285 }
292286
293287 sumneko_cmd = {
@@ -310,6 +304,18 @@ if is_mac then
310304 Lua = {
311305 diagnostics = {
312306 globals = {
307+ -- vim
308+ " vim" ,
309+
310+ -- Busted
311+ " describe" ,
312+ " it" ,
313+ " before_each" ,
314+ " after_each" ,
315+ " teardown" ,
316+ " pending" ,
317+ " clear" ,
318+
313319 -- Colorbuddy
314320 " Color" ,
315321 " c" ,
@@ -332,8 +338,6 @@ if is_mac then
332338else
333339 -- Load lua configuration from nlua.
334340 _ = require (" nlua.lsp.nvim" ).setup (lspconfig , {
335- cmd = sumneko_cmd ,
336- cmd_env = sumneko_env ,
337341 on_init = custom_init ,
338342 on_attach = custom_attach ,
339343 capabilities = updated_capabilities ,
@@ -361,6 +365,10 @@ else
361365 })
362366end
363367
368+ for server , config in pairs (servers ) do
369+ setup_server (server , config )
370+ end
371+
364372if pcall (require , " sg.lsp" ) then
365373 require (" sg.lsp" ).setup {
366374 on_init = custom_init ,
0 commit comments