conditions.lua 462 B

1234567891011121314151617
  1. local window_width_limit = 100
  2. local conditions = {
  3. buffer_not_empty = function()
  4. return vim.fn.empty(vim.fn.expand "%:t") ~= 1
  5. end,
  6. hide_in_width = function()
  7. return vim.o.columns > window_width_limit
  8. end,
  9. -- check_git_workspace = function()
  10. -- local filepath = vim.fn.expand "%:p:h"
  11. -- local gitdir = vim.fn.finddir(".git", filepath .. ";")
  12. -- return gitdir and #gitdir > 0 and #gitdir < #filepath
  13. -- end,
  14. }
  15. return conditions