neovim: update lualine setup
This commit is contained in:
@@ -13,7 +13,7 @@ local branch = {
|
|||||||
|
|
||||||
local diagnostics = {
|
local diagnostics = {
|
||||||
"diagnostics",
|
"diagnostics",
|
||||||
sections = { "error", "warn", "info", "hint" },
|
sections = { "error", "warn" },
|
||||||
always_visible = true,
|
always_visible = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,16 +92,10 @@ local location = {
|
|||||||
local line = vim.fn.line(".")
|
local line = vim.fn.line(".")
|
||||||
local total_lines = vim.api.nvim_buf_line_count(0)
|
local total_lines = vim.api.nvim_buf_line_count(0)
|
||||||
|
|
||||||
local percent = math.floor(line / total_lines * 100)
|
return line .. "/" .. total_lines
|
||||||
|
|
||||||
return line .. "/" .. total_lines .. " (" .. percent .. "%%)"
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local diff = {
|
|
||||||
"diff",
|
|
||||||
}
|
|
||||||
|
|
||||||
lualine.setup({
|
lualine.setup({
|
||||||
options = {
|
options = {
|
||||||
component_separators = "",
|
component_separators = "",
|
||||||
@@ -123,7 +117,7 @@ lualine.setup({
|
|||||||
lualine_a = { mode },
|
lualine_a = { mode },
|
||||||
lualine_b = { branch },
|
lualine_b = { branch },
|
||||||
lualine_c = { diagnostics, relative_filename },
|
lualine_c = { diagnostics, relative_filename },
|
||||||
lualine_x = { searchcount, diff, location, tabstop, fileformat },
|
lualine_x = { searchcount, location, tabstop, fileformat },
|
||||||
lualine_y = { filetype },
|
lualine_y = { filetype },
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user