From c6e7e756d07d67a4ec2ef0c3a80b7a2a2c95d182 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 15 Dec 2021 08:32:19 -0800 Subject: [PATCH] Don't error when trying to handle older diagnostic api --- neovim/lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index 5c53434..17fd607 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -75,7 +75,7 @@ local function default_attach(client, bufnr) buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) -- Open diagnostic on hold - if vim.diagnostic ~= nil then + if vim["diagnostic"] ~= nil then vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] end