🐛 fix(nvim): lualine icons fixed for diagnostics and git, as well as added overseer to the bar
This commit is contained in:
parent
2277d612ca
commit
44ea9a5d01
1 changed files with 76 additions and 0 deletions
|
@ -2,13 +2,88 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = function()
|
opts = function()
|
||||||
|
-- PERF: we don't need this lualine require madness 🤷
|
||||||
|
local lualine_require = require("lualine_require")
|
||||||
|
lualine_require.require = require
|
||||||
|
|
||||||
|
local Util = require("lazyvim.util")
|
||||||
|
local icons = require("lazyvim.config").icons
|
||||||
|
|
||||||
|
vim.o.laststatus = vim.g.lualine_laststatus
|
||||||
|
|
||||||
return {
|
return {
|
||||||
options = {
|
options = {
|
||||||
|
theme = "auto",
|
||||||
|
globalstatus = true,
|
||||||
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
|
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
|
||||||
component_separators = { left = "", right = "" },
|
component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
|
lualine_b = { "branch" },
|
||||||
|
|
||||||
|
lualine_c = {
|
||||||
|
Util.lualine.root_dir(),
|
||||||
|
{
|
||||||
|
"diagnostics",
|
||||||
|
symbols = {
|
||||||
|
error = icons.diagnostics.Error,
|
||||||
|
warn = icons.diagnostics.Warn,
|
||||||
|
info = icons.diagnostics.Info,
|
||||||
|
hint = icons.diagnostics.Hint,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||||
|
{ Util.lualine.pretty_path() },
|
||||||
|
},
|
||||||
|
lualine_x = {
|
||||||
|
{
|
||||||
|
"overseer",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
function() return require("noice").api.status.command.get() end,
|
||||||
|
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||||
|
color = Util.ui.fg("Statement"),
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
function() return require("noice").api.status.mode.get() end,
|
||||||
|
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||||
|
color = Util.ui.fg("Constant"),
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
function() return " " .. require("dap").status() end,
|
||||||
|
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||||
|
color = Util.ui.fg("Debug"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
require("lazy.status").updates,
|
||||||
|
cond = require("lazy.status").has_updates,
|
||||||
|
color = Util.ui.fg("Special"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diff",
|
||||||
|
symbols = {
|
||||||
|
added = icons.git.added,
|
||||||
|
modified = icons.git.modified,
|
||||||
|
removed = icons.git.removed,
|
||||||
|
},
|
||||||
|
source = function()
|
||||||
|
local gitsigns = vim.b.gitsigns_status_dict
|
||||||
|
if gitsigns then
|
||||||
|
return {
|
||||||
|
added = gitsigns.added,
|
||||||
|
modified = gitsigns.changed,
|
||||||
|
removed = gitsigns.removed,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{ "progress", separator = " ", padding = { left = 1, right = 1 } },
|
{ "progress", separator = " ", padding = { left = 1, right = 1 } },
|
||||||
},
|
},
|
||||||
|
@ -16,6 +91,7 @@ return {
|
||||||
{ "location", padding = { left = 1, right = 1 } },
|
{ "location", padding = { left = 1, right = 1 } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
extensions = { "neo-tree", "lazy" },
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue