From 458ec6367670a847cc7a48f8ab32299b22509417 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 19 Dec 2021 21:44:18 +0530 Subject: use diagnostic.get over diagnostic.get_count --- lua/lsp.lua | 3 ++- plugin/statusline.vim | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lsp.lua b/lua/lsp.lua index b21ea70..62c49d2 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -58,7 +58,8 @@ nvim_lsp.ccls.setup { threads = 0; }; clang = { - excludeArgs = { "-frounding-math"} ; + extraArgs = { "-fopenmp" }; + excludeArgs = { "-frounding-math" } ; }; } } diff --git a/plugin/statusline.vim b/plugin/statusline.vim index 0a1f6c0..d1f7d05 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim @@ -94,8 +94,8 @@ function! LinterStatus() abort let sl = '' let msgs = [] if luaeval('not vim.tbl_isempty(vim.lsp.buf_get_clients(0))') - let errs = luaeval("vim.lsp.diagnostic.get_count(0, [[Error]])") - let warns = luaeval("vim.lsp.diagnostic.get_count(0, [[Warning]])") + let errs = luaeval("#vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })") + let warns = luaeval("#vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })") if errs != 0 call add(msgs, printf('%%5*%s×%%* ', errs)) endif -- cgit v1.2.3