1
0
Fork 0
nvim-configs/lua/conf/utils.lua

14 lines
308 B
Lua
Raw Normal View History

2022-03-05 11:35:05 +00:00
local M = {}
function M.is_buffer_empty()
-- Check whether the current buffer is empty
return vim.fn.empty(vim.fn.expand '%:t') == 1
end
function M.has_width_gt(cols)
-- Check if the windows width is greater than a given number of columns
return vim.fn.winwidth(0) / 2 > cols
end
return M