mirror of
https://github.com/marianozunino/nvim.git
synced 2025-06-28 18:43:50 -03:00
batman!
This commit is contained in:
commit
ae7d9bf4b6
63 changed files with 2160 additions and 0 deletions
66
lua/config/plugins/status.lua
Normal file
66
lua/config/plugins/status.lua
Normal file
|
@ -0,0 +1,66 @@
|
|||
local M = {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
}
|
||||
|
||||
function M.config()
|
||||
local lualine = require("lualine")
|
||||
|
||||
local mode = "mode"
|
||||
local filetype = { "filetype", icon_only = true }
|
||||
|
||||
local diagnostics = {
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
sections = { "error", "warn", "info", "hint" },
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
hint = icons.diagnostics.Hint,
|
||||
info = icons.diagnostics.Info,
|
||||
warn = icons.diagnostics.Warning,
|
||||
},
|
||||
colored = true,
|
||||
update_in_insert = false,
|
||||
always_visible = false,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
"diff",
|
||||
source = function()
|
||||
local gitsigns = vim.b.gitsigns_status_dict
|
||||
if gitsigns then
|
||||
return {
|
||||
added = gitsigns.added,
|
||||
modified = gitsigns.changed,
|
||||
removed = gitsigns.removed,
|
||||
}
|
||||
end
|
||||
end,
|
||||
symbols = {
|
||||
added = icons.git.LineAdded .. " ",
|
||||
modified = icons.git.LineModified .. " ",
|
||||
removed = icons.git.LineRemoved .. " ",
|
||||
},
|
||||
colored = true,
|
||||
always_visible = false,
|
||||
}
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = "auto",
|
||||
globalstatus = true,
|
||||
section_separators = "",
|
||||
component_separators = "",
|
||||
disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { diff, diagnostics, filetype },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue