From 1423d5d0820eeefc97d6cdaf3ae8b554676619cc Mon Sep 17 00:00:00 2001 From: "Mr.Z" <44504986+Mr-LLLLL@users.noreply.github.com> Date: Fri, 24 May 2024 16:19:22 +0800 Subject: [PATCH] fix:`diagnostic` config may be a false (#466) Co-authored-by: zhaogang --- lua/go/gopls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/go/gopls.lua b/lua/go/gopls.lua index 4bdf23a..96efb98 100644 --- a/lua/go/gopls.lua +++ b/lua/go/gopls.lua @@ -288,7 +288,7 @@ end local range_format = 'textDocument/rangeFormatting' local formatting = 'textDocument/formatting' M.setups = function() - local update_in_insert = _GO_NVIM_CFG.diagnostic.update_in_insert or false + local update_in_insert = _GO_NVIM_CFG.diagnostic and _GO_NVIM_CFG.diagnostic.update_in_insert or false local diagTrigger = update_in_insert and 'Edit' or 'Save' local diagDelay = update_in_insert and '1s' or '250ms' local setups = {