diff options
author | LostNeophyte <[email protected]> | 2023-02-18 08:55:05 +0100 |
---|---|---|
committer | LostNeophyte <[email protected]> | 2023-02-18 08:55:05 +0100 |
commit | 8f70ecd882cf44567ddbffb469373501492938f9 (patch) | |
tree | 1498fd1de08c1aec46fa628701e1b5e9a47c4e3b /lua/lvim/builtin/lualine/conditions.lua | |
parent | 3144585515000a1c3064c6129ded74f662598de1 (diff) |
refactor(builtins): move builtins to lvim/builtinrefactor/builtins
Diffstat (limited to 'lua/lvim/builtin/lualine/conditions.lua')
-rw-r--r-- | lua/lvim/builtin/lualine/conditions.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lua/lvim/builtin/lualine/conditions.lua b/lua/lvim/builtin/lualine/conditions.lua new file mode 100644 index 00000000..42d52a83 --- /dev/null +++ b/lua/lvim/builtin/lualine/conditions.lua @@ -0,0 +1,17 @@ +local window_width_limit = 100 + +local conditions = { + buffer_not_empty = function() + return vim.fn.empty(vim.fn.expand "%:t") ~= 1 + end, + hide_in_width = function() + return vim.o.columns > window_width_limit + end, + -- 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, +} + +return conditions |