From f11909b5649f6169fe48b61a40def4924754c38e Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Mon, 19 Sep 2022 22:14:32 -0400 Subject: feat: breadcrumbs (#3043) --- lua/lvim/utils/functions.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lua/lvim/utils/functions.lua') diff --git a/lua/lvim/utils/functions.lua b/lua/lvim/utils/functions.lua index de46bc8a..1cb8ec8e 100644 --- a/lua/lvim/utils/functions.lua +++ b/lua/lvim/utils/functions.lua @@ -16,4 +16,17 @@ function M.smart_quit() end end +function M.isempty(s) + return s == nil or s == "" +end + +function M.get_buf_option(opt) + local status_ok, buf_option = pcall(vim.api.nvim_buf_get_option, 0, opt) + if not status_ok then + return nil + else + return buf_option + end +end + return M -- cgit v1.2.3