diff options
author | LostNeophyte <[email protected]> | 2023-02-11 14:41:45 +0100 |
---|---|---|
committer | LostNeophyte <[email protected]> | 2023-02-11 14:44:24 +0100 |
commit | 7be867e2aac31ef04565eaba6b416ede766c06d7 (patch) | |
tree | 413dc6c0e82b04e14f505b7f291ed56f97dea9ea /lua/lvim/core/builtins/lualine/conditions.lua | |
parent | ed5b43bba06e6d1ef7b6bd7ed95c55b64e2df3c8 (diff) |
refactor(builtins): move builtins to ./builtins
Diffstat (limited to 'lua/lvim/core/builtins/lualine/conditions.lua')
-rw-r--r-- | lua/lvim/core/builtins/lualine/conditions.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lua/lvim/core/builtins/lualine/conditions.lua b/lua/lvim/core/builtins/lualine/conditions.lua new file mode 100644 index 00000000..42d52a83 --- /dev/null +++ b/lua/lvim/core/builtins/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 |