From 10771fdb7b4c4b59f2b5c1e8757b0379e1314659 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Sun, 6 Nov 2022 21:42:32 +0900 Subject: [PATCH] Use new API and add check for nvim-web-devicons (#78) --- lua/telescope/_extensions/frecency.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/telescope/_extensions/frecency.lua b/lua/telescope/_extensions/frecency.lua index 9a6b218..6416f4f 100644 --- a/lua/telescope/_extensions/frecency.lua +++ b/lua/telescope/_extensions/frecency.lua @@ -294,16 +294,18 @@ local function set_config_state(opt_name, value, default) state[opt_name] = value == nil and default or value end -local health_ok = vim.fn["health#report_ok"] -local health_error = vim.fn["health#report_error"] - local function checkhealth() local has_sql, _ = pcall(require, "sqlite") if has_sql then - health_ok "sql.nvim installed." + vim.health.report_ok "sql.nvim installed." -- return "MOOP" else - health_error "NOOO" + vim.health.report_error "Need sql.nvim to be installed." + end + if has_devicons then + vim.health.report_ok "nvim-web-devicons installed." + else + vim.health.report_info "nvim-web-devicons is not installed." end end