Update status line

This commit is contained in:
2022-01-31 23:09:48 +03:00
parent dd9d369c88
commit 4173334340

View File

@@ -1,37 +1,55 @@
local lualine = require("lualine") local lualine = require("lualine")
-- Section "a"
local mode = {
"mode",
}
-- Section "b"
local branch = { local branch = {
"branch", "branch",
icons_enabled = true, icons_enabled = true,
icon = "", icon = "",
} }
local mode = { -- Section "c"
"mode", local filename = {
"filename",
}
local fileformat = {
"fileformat",
symbols = {
unix = "",
dos = "",
mac = "",
},
} }
-- Section "x"
local location = {
"location",
}
-- Section "y"
local encoding = {
"encoding",
}
local filetype = { local filetype = {
"filetype", "filetype",
} }
local location = function()
local line, column = unpack(vim.api.nvim_win_get_cursor(0))
return "Ln " .. line .. ", Col " .. column
end
lualine.setup({ lualine.setup({
options = { options = {
disabled_filetypes = { "NvimTree" }, disabled_filetypes = { "NvimTree" },
component_separators = { left = "", right = "" }, component_separators = "",
section_separators = { left = "", right = "" }, section_separators = "",
}, },
sections = { sections = {
lualine_a = { mode }, lualine_a = { mode },
lualine_b = { branch }, lualine_b = { branch },
lualine_c = {}, lualine_c = { filename, fileformat },
lualine_x = { location }, lualine_x = { location },
lualine_y = { "encoding", filetype }, lualine_y = { encoding, filetype },
lualine_z = {}, lualine_z = {},
}, },
}) })