diff --git a/modules/nixvim/plugins/ui/lualine.nvim/default.nix b/modules/nixvim/plugins/ui/lualine.nvim/default.nix new file mode 100644 index 0000000..04ee7ac --- /dev/null +++ b/modules/nixvim/plugins/ui/lualine.nvim/default.nix @@ -0,0 +1,36 @@ +_: { + plugins.lualine = { + enable = true; + + luaConfig.pre.__raw = '' + vim.g.lualine_laststatus = vim.o.laststatus + if vim.fn.argc(-1) > 0 then + -- set an empty statusline till lualine loads + vim.o.statusline = " " + else + -- hide the statusline on the starter page + vim.o.laststatus = 0 + end + ''; + + settings = { + options = { + theme = "auto"; + globalstatus.__raw = "vim.o.laststatus == 3"; + disabled_filetypes.statusline = [ + "dashboard" + "alpha" + "ministarter" + "snacks_dashboard" + ]; + }; + sections = { + lualine_a = ["mode"]; + lualine_b = ["branch"]; + + lualine_c = [ + ]; + }; + }; + }; +}