Remove duplicate fileinfo from status line

This commit is contained in:
Grafcube 2024-04-08 12:59:02 +05:30
parent be9037d8cd
commit d2c250351f
Signed by: grafcube
GPG Key ID: E383688F2878A440
1 changed files with 9 additions and 17 deletions

View File

@ -2,7 +2,7 @@
return {
"rebelot/heirline.nvim",
opts = function(_, opts)
local status = require("astroui.status")
local status = require "astroui.status"
opts.statusline = {
hl = { fg = "fg", bg = "bg" },
status.component.mode { mode_text = { padding = { left = 1, right = 1 } } },
@ -13,17 +13,9 @@ return {
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
provider = function() return vim.o.encoding:upper() end,
},
padding = { right = 2 },
},
@ -31,12 +23,12 @@ return {
{
provider = function()
local fileformat_symbols = {
unix = '', -- e712
dos = '', -- e70f
mac = '', -- e711
unix = "", -- e712
dos = "", -- e70f
mac = "", -- e711
}
return fileformat_symbols[vim.api.nvim_buf_get_option(0, "fileformat")]
end
end,
},
padding = { right = 2 },
},
@ -44,9 +36,9 @@ return {
{
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
return (option and "Spaces: " or "Tabs: ")
.. vim.api.nvim_buf_get_option(0, option and "shiftwidth" or "tabstop")
end,
},
padding = { right = 1 },
},