update status line
This commit is contained in:
@@ -12,23 +12,26 @@ local branch = {
|
|||||||
|
|
||||||
local diagnostics = {
|
local diagnostics = {
|
||||||
"diagnostics",
|
"diagnostics",
|
||||||
sections = { "error", "warn" },
|
sections = { "error", "warn", "info", "hint" },
|
||||||
|
always_visible = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
local filename = {
|
local filename = {
|
||||||
"filename",
|
function()
|
||||||
|
local filename = vim.fn.expand("%:t")
|
||||||
|
local fileext = vim.fn.expand("%:e")
|
||||||
|
local icon = require("nvim-web-devicons").get_icon(filename, fileext)
|
||||||
|
|
||||||
|
return icon .. " " .. filename
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local fileformat = {
|
local fileformat = {
|
||||||
"fileformat",
|
function()
|
||||||
symbols = {
|
return "[" .. vim.bo.fileformat .. "]"
|
||||||
unix = "",
|
end,
|
||||||
dos = "",
|
|
||||||
mac = "",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- don't know if it's working or not. seems working right
|
|
||||||
local tabstop = {
|
local tabstop = {
|
||||||
function()
|
function()
|
||||||
local tabstop = vim.bo.tabstop
|
local tabstop = vim.bo.tabstop
|
||||||
@@ -41,39 +44,6 @@ local tabstop = {
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local location = {
|
|
||||||
"location",
|
|
||||||
}
|
|
||||||
|
|
||||||
local encoding = {
|
|
||||||
"encoding",
|
|
||||||
}
|
|
||||||
|
|
||||||
local filetype = {
|
|
||||||
"filetype",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- local timer = vim.loop.new_timer()
|
|
||||||
-- timer:start(
|
|
||||||
-- 0,
|
|
||||||
-- 1000,
|
|
||||||
-- vim.schedule_wrap(function()
|
|
||||||
-- vim.g.lualine_time_module = os.date("%H:%M", os.time())
|
|
||||||
-- end)
|
|
||||||
-- )
|
|
||||||
-- local time = {
|
|
||||||
-- function()
|
|
||||||
-- return vim.g.lualine_time_module
|
|
||||||
-- end,
|
|
||||||
-- cond = function()
|
|
||||||
-- if vim.g.lualine_time_module then
|
|
||||||
-- return true
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- return false
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
|
|
||||||
lualine.setup({
|
lualine.setup({
|
||||||
options = {
|
options = {
|
||||||
disabled_filetypes = { "NvimTree" },
|
disabled_filetypes = { "NvimTree" },
|
||||||
@@ -83,9 +53,9 @@ lualine.setup({
|
|||||||
sections = {
|
sections = {
|
||||||
lualine_a = { mode },
|
lualine_a = { mode },
|
||||||
lualine_b = { branch },
|
lualine_b = { branch },
|
||||||
lualine_c = { diagnostics, filename, fileformat },
|
lualine_c = { diagnostics },
|
||||||
lualine_x = { tabstop, location, encoding, filetype },
|
lualine_x = { tabstop, fileformat },
|
||||||
lualine_y = {},
|
lualine_y = { filename },
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user