statusline wip
This commit is contained in:
parent
ab3a365450
commit
a9e02c662c
4 changed files with 44 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue