functions.lua 264 B

12345678910111213141516
  1. local M = {}
  2. function M.isempty(s)
  3. return s == nil or s == ""
  4. end
  5. function M.get_buf_option(opt)
  6. local status_ok, buf_option = pcall(vim.api.nvim_buf_get_option, 0, opt)
  7. if not status_ok then
  8. return nil
  9. else
  10. return buf_option
  11. end
  12. end
  13. return M