Skip to content

Commit 49e5c8f

Browse files
committed
fix diagnostic
1 parent 4659981 commit 49e5c8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/go.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ function go.setup(cfg)
285285
end
286286
else
287287
-- vim.notify('go.nvim diagnostic setup deprecated, use vim.diagnostic instead', vim.log.levels.DEBUG)
288-
local dcfg = vim.tbl_extend('force', {}, _GO_NVIM_CFG.diagnostic)
289-
vim.diagnostic.config(dcfg)
288+
if next(_GO_NVIM_CFG.diagnostic or {}) then
289+
local dcfg = vim.tbl_extend('force', {}, _GO_NVIM_CFG.diagnostic)
290+
vim.diagnostic.config(dcfg)
291+
end
290292
end
291293
vim.defer_fn(function()
292294
require('go.coverage').setup()

0 commit comments

Comments
 (0)