chore(nvim): lightline config
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Rob Watson 2024-03-10 12:47:53 +01:00
parent 33e59263d3
commit 81a472d8d5
1 changed files with 29 additions and 23 deletions

View File

@ -18,6 +18,33 @@ local function format_diff_element(val, sym)
return sym .. val return sym .. val
end end
local diagnostics = {
"diagnostics",
sources = { "nvim_lsp" },
diagnostics_color = {
error = { fg = "#ffffff", bg = "#bf616a" },
warn = { fg = "#ebcb8b" },
info = { fg = "#81a1c1" },
hint = { fg = "#a3be8c" },
},
always_visible = false,
separator = { left = " " },
symbols = {
error = function(count)
return count .. "E"
end,
warn = function(count)
return count .. "W"
end,
info = function(count)
return count .. "I"
end,
hint = function(count)
return count .. "H"
end,
},
}
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = false, icons_enabled = false,
@ -47,41 +74,20 @@ require("lualine").setup({
return format_diff_element(vim.b.gitsigns_status_dict.added, "+") return format_diff_element(vim.b.gitsigns_status_dict.added, "+")
end, end,
color = { fg = "#a3be8c" }, color = { fg = "#a3be8c" },
padding = 1,
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.changed, "~") return format_diff_element(vim.b.gitsigns_status_dict.changed, "~")
end, end,
color = { fg = "#ebcb8b" }, color = { fg = "#ebcb8b" },
padding = 1,
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.removed, "-") return format_diff_element(vim.b.gitsigns_status_dict.removed, "-")
end, end,
color = { fg = "#bf616a" }, color = { fg = "#bf616a" },
padding = 1,
},
{
"diagnostics",
sources = { "nvim_lsp" },
always_visible = false,
symbols = {
error = function(count)
return count .. "E"
end,
warn = function(count)
return count .. "W"
end,
info = function(count)
return count .. "I"
end,
hint = function(count)
return count .. "H"
end,
},
}, },
diagnostics,
}, },
lualine_x = { lualine_x = {
{ {
@ -102,7 +108,7 @@ require("lualine").setup({
inactive_sections = { inactive_sections = {
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_c = { "filename" }, lualine_c = { "filename", diagnostics },
lualine_x = { { "location", padding = { right = 0 } } }, lualine_x = { { "location", padding = { right = 0 } } },
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},