109 lines
1.7 KiB
Lua
109 lines
1.7 KiB
Lua
-- lua/plugins/lualine.lua
|
|
|
|
return {
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
dependencies = {
|
|
"nvim-tree/nvim-web-devicons",
|
|
},
|
|
|
|
config = function()
|
|
local lualine = require('lualine')
|
|
lualine.setup({
|
|
options = {
|
|
theme = 'auto',
|
|
-- fmt = default,
|
|
-- fmt = string.upper,
|
|
|
|
ignore_focus = {
|
|
|
|
},
|
|
|
|
refresh = {
|
|
statusline = 100,
|
|
tabline = 100,
|
|
winbar = 100,
|
|
},
|
|
},
|
|
sections = {
|
|
lualine_a = {
|
|
-- {
|
|
-- 'windows'
|
|
-- },
|
|
{
|
|
'diff',
|
|
colored = true,
|
|
diff_color = {
|
|
added = 'LuaLineDiffAdd',
|
|
modified = 'LuaLineDiffChange',
|
|
removed = 'LuaLineDiffDelete',
|
|
},
|
|
},
|
|
-- {
|
|
-- 'buffers',
|
|
-- show_filename_only = true,
|
|
-- show_modified_status = false,
|
|
--
|
|
-- mode = 4,
|
|
--
|
|
-- filetype_names = {
|
|
-- NvimTree = 'NvimTree'
|
|
-- },
|
|
-- },
|
|
{
|
|
'mode',
|
|
fmt = function(str) return '[' .. str:sub(1,1) .. ']' end,
|
|
},
|
|
},
|
|
lualine_b = {
|
|
{ 'branch' }
|
|
},
|
|
lualine_c = {
|
|
{
|
|
'filename',
|
|
file_status = true,
|
|
newfile_status = false,
|
|
path = 0,
|
|
fmt = string.lower,
|
|
shorting_target = 40,
|
|
|
|
symbols = {
|
|
modified = '[+]',
|
|
readonly = '[-]',
|
|
unamed = '[No Name]',
|
|
newfile = '[New]',
|
|
},
|
|
}
|
|
},
|
|
lualine_x = {
|
|
{
|
|
require("lazy.status").updates,
|
|
cond = require("lazy.status").has_updates,
|
|
color = { fg = "#ff9e64" },
|
|
},
|
|
{
|
|
'encoding'
|
|
},
|
|
{
|
|
'filetype',
|
|
colored = true,
|
|
icons_enabled = true,
|
|
icon_only = true,
|
|
icon = { align='center' }
|
|
}
|
|
},
|
|
lualine_y = {
|
|
{
|
|
'progress',
|
|
},
|
|
},
|
|
lualine_z = {
|
|
{
|
|
'location',
|
|
},
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
}
|