mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-10 19:56:24 +00:00
Migrate plugins from Plug to packer
This commit is contained in:
13
.config/nvim/lua/utils.lua
Normal file
13
.config/nvim/lua/utils.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
Reference in New Issue
Block a user