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