summaryrefslogtreecommitdiff
path: root/lua/lvim/utils/functions.lua
blob: b2b194edaf09543790284c858232577ec19b39a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local M = {}

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