add tabstop module for lualine

This commit is contained in:
2022-02-05 11:43:16 +03:00
parent cc7eeb9212
commit 99d69c6448

View File

@@ -29,6 +29,19 @@ local fileformat = {
}, },
} }
-- don't know if it's working or not. seems working right
local tabstop = {
function()
local tabstop = vim.bo.tabstop
local expandtab = vim.bo.expandtab
local method = expandtab == true and "spaces" or "tabs"
local format = tabstop .. " " .. method
return format
end,
}
local location = { local location = {
"location", "location",
} }
@@ -72,7 +85,7 @@ lualine.setup({
lualine_a = { mode }, lualine_a = { mode },
lualine_b = { branch }, lualine_b = { branch },
lualine_c = { diagnostics, filename, fileformat }, lualine_c = { diagnostics, filename, fileformat },
lualine_x = { location, encoding, filetype, time }, lualine_x = { tabstop, location, encoding, filetype, time },
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
}, },