summaryrefslogtreecommitdiff
path: root/lualine.lua
blob: 0794ecf643b281fc16afa43f98c952c6723d7344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
return {
	"nvim-lualine/lualine.nvim",
	dependencies = { "nvim-tree/nvim-web-devicons" },

	config = function()
		-- Function to show macro recording status
		local function recording()
			local reg = vim.fn.reg_recording()
			if reg ~= "" then
				return "REC @" .. reg
			end
			return ""
		end

		require("lualine").setup({
			options = {
				theme = "auto",
				component_separators = "",
				section_separators = "",
				globalstatus = true,
			},

			sections = {
				lualine_a = { "mode" },
				lualine_b = {},
				lualine_c = {
					{ "filename", path = 1 },
				},

				lualine_x = {
					recording,
					"diagnostics",
				},

				lualine_y = { "filetype" },
				lualine_z = { "location" },
			},

			inactive_sections = {
				lualine_a = {},
				lualine_b = {},
				lualine_c = { "filename" },
				lualine_x = {},
				lualine_y = {},
				lualine_z = {},
			},
		})
	end,
}