feat(lualine): better lualine with git status, diagnostics and navic lsp information (#15)

This commit is contained in:
Andreas Gerlach 2023-01-06 07:27:28 +01:00 committed by GitHub
parent 6bfba2d669
commit d74759de76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 7 deletions

View file

@ -69,12 +69,35 @@ return {
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = {
options = {
globalstatus = true,
disabled_filetypes = { statusline = { "lazy", "alpha" } },
},
},
config = function()
local navic = require("nvim-navic")
local lualine = require("lualine")
local symbols = require("lazyvim.config.settings")
lualine.setup({
options = {
globalstatus = true,
disabled_filetypes = { statusline = { "lazy", "alpha" } },
},
sections = {
lualine_a = { "mode" },
lualine_b = {
{ "branch" },
{
"diff",
symbols = { added = symbols.icons.git.added, modified = symbols.icons.git.modified, removed = symbols.icons.git.removed }, -- changes diff symbols
},
},
lualine_c = {
{
"diagnostics",
symbols = { error = symbols.icons.diagnostics.Error, warn = symbols.icons.diagnostics.Warn, info = symbols.icons.diagnostics.Info, hint = symbols.icons.diagnostics.Hint }
},
{ "filename", padding = { left = 1, right = 1 } },
{ navic.get_location, cond = navic.is_available }
},
}
})
end
},
-- indent guides for Neovim