2022-09-21 23:58:52 +02:00
|
|
|
local window_width_limit = 100
|
2021-08-20 11:16:29 +02:00
|
|
|
|
|
|
|
local conditions = {
|
|
|
|
buffer_not_empty = function()
|
|
|
|
return vim.fn.empty(vim.fn.expand "%:t") ~= 1
|
|
|
|
end,
|
|
|
|
hide_in_width = function()
|
2022-09-22 03:21:00 +02:00
|
|
|
return vim.o.columns > window_width_limit
|
2021-08-20 11:16:29 +02:00
|
|
|
end,
|
2021-08-26 09:20:04 +02:00
|
|
|
-- check_git_workspace = function()
|
|
|
|
-- local filepath = vim.fn.expand "%:p:h"
|
|
|
|
-- local gitdir = vim.fn.finddir(".git", filepath .. ";")
|
|
|
|
-- return gitdir and #gitdir > 0 and #gitdir < #filepath
|
|
|
|
-- end,
|
2021-08-20 11:16:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return conditions
|