2023-06-27 09:52:49 +00:00
|
|
|
return {
|
2024-03-15 14:15:26 +00:00
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
dependencies = {
|
|
|
|
{ 'kyazdani42/nvim-web-devicons', lazy = true },
|
|
|
|
'nvim-lua/lsp-status.nvim',
|
|
|
|
'crater2150/vim-theme-chroma',
|
|
|
|
},
|
|
|
|
event = "VeryLazy",
|
|
|
|
opts = function(_, opts)
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = require('chroma-theme.lualine')
|
|
|
|
},
|
|
|
|
tabline = {
|
|
|
|
lualine_a = { 'branch' },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = { { 'buffers', show_filename_only = false, symbols = { modified = " ✏️]", alternate_file = " 🔃", folder = " 📁" }, } },
|
|
|
|
lualine_x = {},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {
|
|
|
|
{
|
|
|
|
'tabs',
|
|
|
|
mode = 1,
|
|
|
|
fmt = function(name, context)
|
|
|
|
local buflist = vim.fn.tabpagebuflist(context.tabnr)
|
|
|
|
local mod = not vim.tbl_isempty(vim.tbl_filter(
|
|
|
|
function(bufnr) return vim.fn.getbufvar(bufnr, '&mod') == 1 end,
|
|
|
|
buflist))
|
2023-08-23 11:25:45 +00:00
|
|
|
|
2024-03-15 14:15:26 +00:00
|
|
|
local wincount = #vim.tbl_filter(
|
|
|
|
function(i) return i == 'leaf' end,
|
|
|
|
vim.tbl_flatten(vim.fn.winlayout(context.tabnr))
|
|
|
|
)
|
2023-08-23 11:25:45 +00:00
|
|
|
|
2024-03-15 14:15:26 +00:00
|
|
|
return name .. (wincount > 1 and ' +' .. (wincount - 1) or '') .. (mod and ' [✏️]]' or '')
|
|
|
|
end
|
|
|
|
} }
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = { 'filename' },
|
|
|
|
lualine_b = { 'diff', 'diagnostics' },
|
|
|
|
lualine_x = { "require'lsp-status'.status()" },
|
|
|
|
lualine_y = { 'filetype' },
|
|
|
|
lualine_z = { 'searchcount', 'selectioncount', 'location' }
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = {},
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = { 'filename' },
|
|
|
|
lualine_x = { 'location' },
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {}
|
|
|
|
},
|
|
|
|
winbar = {},
|
|
|
|
inactive_winbar = {},
|
|
|
|
extensions = {}
|
|
|
|
}
|
|
|
|
end,
|
2023-06-27 09:52:49 +00:00
|
|
|
}
|