63 lines
1.8 KiB
Lua
63 lines
1.8 KiB
Lua
---@type LazySpec
|
|
return {
|
|
"rebelot/heirline.nvim",
|
|
opts = function(_, opts)
|
|
local status = require("astroui.status")
|
|
opts.statusline = {
|
|
hl = { fg = "fg", bg = "bg" },
|
|
status.component.mode { mode_text = { padding = { left = 1, right = 1 } } },
|
|
status.component.git_branch(),
|
|
status.component.file_info(),
|
|
status.component.git_diff(),
|
|
status.component.fill(),
|
|
status.component.diagnostics(),
|
|
status.component.lsp(),
|
|
status.component.treesitter { padding = { right = 1 } },
|
|
status.component.file_info {
|
|
filename = false,
|
|
file_modified = false,
|
|
file_read_only = false,
|
|
filetype = {},
|
|
},
|
|
status.component.builder {
|
|
{
|
|
provider = function()
|
|
return vim.o.encoding:upper()
|
|
end
|
|
},
|
|
padding = { right = 2 },
|
|
},
|
|
status.component.builder {
|
|
{
|
|
provider = function()
|
|
local fileformat_symbols = {
|
|
unix = '', -- e712
|
|
dos = '', -- e70f
|
|
mac = '', -- e711
|
|
}
|
|
return fileformat_symbols[vim.api.nvim_buf_get_option(0, "fileformat")]
|
|
end
|
|
},
|
|
padding = { right = 2 },
|
|
},
|
|
status.component.builder {
|
|
{
|
|
provider = function()
|
|
local option = vim.api.nvim_buf_get_option(0, "expandtab")
|
|
return (option and "Spaces: " or "Tabs: ") ..
|
|
vim.api.nvim_buf_get_option(0, option and "shiftwidth" or "tabstop")
|
|
end
|
|
},
|
|
padding = { right = 1 },
|
|
},
|
|
status.component.nav {
|
|
scrollbar = false,
|
|
padding = { right = 1 },
|
|
surround = { separator = "right", color = status.hl.mode_bg },
|
|
hl = { fg = "bg" },
|
|
},
|
|
}
|
|
return opts
|
|
end,
|
|
}
|