From 2e6c94069e92cb4a43416b3ac0267e941b3fd47e Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sat, 20 Nov 2021 09:30:49 -0500 Subject: fix(health): fix problem that could return empty results (#1461) Co-authored-by: erw7 --- lua/lspconfig/health.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lua') diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua index 51779132..d922fe85 100644 --- a/lua/lspconfig/health.lua +++ b/lua/lspconfig/health.lua @@ -2,6 +2,9 @@ local M = {} function M.check() local configs = require 'lspconfig/configs' + if not configs or #configs == 0 then + vim.fn['health#report_warn'] [[Can't find any config.]] + end for _, top_level_config in pairs(configs) do -- Only check configs that have a make_config function. if not (top_level_config.make_config == nil) then -- cgit v1.2.3-70-g09d2