From 790685ef9d1d523106304e2a32d872e42fa22aa2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 May 2024 11:12:07 +0200 Subject: [PATCH] fix: Safe handling of config option #84 --- lua/utils/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/utils/functions.lua b/lua/utils/functions.lua index b14f7746..d96622ac 100644 --- a/lua/utils/functions.lua +++ b/lua/utils/functions.lua @@ -75,10 +75,10 @@ end -- Return file browser command M.file_browser = function() - if vim.g.config.plugins.yazi.enabled then + if M.safe_nested_config(vim.g.config.plugins, "yazi", "enabled") then return "lua require('yazi').yazi(nil, vim.fn.getcwd())" end - if vim.g.config.plugins.lf.enable then + if M.safe_nested_config(vim.g.config.plugins, "lf", "enable") then return "Lf" end return "Telescope file_browser grouped=true"