From c2dae64e0bf3c8334d715adb851995b3526a1108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 19 Mar 2024 19:26:14 +0100 Subject: Fixes --- config/nvim/lua/plugins.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'config/nvim/lua') diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index e9421d0..ce54ce6 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -112,15 +112,17 @@ require("packer").startup(function(use) local ok, decoded = pcall(vim.json.decode, line) if ok and decoded.file ~= nil then for _, result in ipairs(decoded.results) do - table.insert(diagnostics, { - lnum = result.line, - end_lnum = result.line, - col = result.column, - end_col = result.endColumn, - severity = vim.diagnostic.severity.HINT, - source = "deadnix", - message = result.message, - }) + if result.line ~= nil then + table.insert(diagnostics, { + lnum = result.line, + end_lnum = result.line, + col = result.column, + end_col = result.endColumn, + severity = vim.diagnostic.severity.HINT, + source = "deadnix", + message = result.message, + }) + end end end end -- cgit v1.2.3