statusline wip

This commit is contained in:
siduck76 2021-03-08 10:54:53 +05:30
parent ab3a365450
commit a9e02c662c
4 changed files with 44 additions and 28 deletions

View file

@ -20,3 +20,17 @@ opt('o' , 'cmdheight' , 1)
opt('o' , 'updatetime' , 250)
opt('o' , 'clipboard' , 'unnamedplus')
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