diff options
author | Christian Chiarulli <[email protected]> | 2022-09-19 22:14:32 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-19 22:14:32 -0400 |
commit | f11909b5649f6169fe48b61a40def4924754c38e (patch) | |
tree | 9c732a3b1db4326a5075092816295b72d2b2dc6b /lua/lvim/utils | |
parent | 2190dba4c7e297568549743476b8f76c620ae4cc (diff) |
feat: breadcrumbs (#3043)
Diffstat (limited to 'lua/lvim/utils')
-rw-r--r-- | lua/lvim/utils/functions.lua | 13 |
1 files changed, 13 insertions, 0 deletions
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 |