2023-11-17 11:24:21 +00:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
2024-02-23 18:23:02 +00:00
|
|
|
opts = function()
|
|
|
|
local options = require('options')
|
|
|
|
return {
|
2023-11-17 11:24:21 +00:00
|
|
|
options = {
|
2024-02-23 18:23:02 +00:00
|
|
|
theme = "vscode",
|
|
|
|
component_separators = { left = '', right = '' },
|
2024-03-01 17:57:06 +00:00
|
|
|
section_separators = { left = '', right = '' },
|
|
|
|
globalstatus = true
|
2023-11-27 22:37:34 +00:00
|
|
|
},
|
|
|
|
sections = {
|
2024-02-23 18:23:02 +00:00
|
|
|
lualine_a = {
|
2024-03-01 17:57:06 +00:00
|
|
|
{
|
|
|
|
function ()
|
|
|
|
return ' '
|
|
|
|
end,
|
|
|
|
separator = { left = '', right = '' },
|
|
|
|
padding = 1,
|
|
|
|
fmt = function (text)
|
|
|
|
return string.gsub(text, "%s+", "")
|
|
|
|
end
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'mode',
|
|
|
|
padding = 0,
|
|
|
|
fmt = function (text)
|
|
|
|
return string.gsub(text, "%s+", "") .. ' '
|
|
|
|
end
|
|
|
|
}
|
2024-02-23 18:23:02 +00:00
|
|
|
},
|
2023-11-27 22:37:34 +00:00
|
|
|
lualine_b = {
|
2024-03-01 17:57:06 +00:00
|
|
|
{
|
|
|
|
'filename',
|
|
|
|
symbols = {
|
|
|
|
modified = '', -- Text to show when the file is modified.
|
|
|
|
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
|
|
|
unnamed = '', -- Text to show for unnamed buffers.
|
|
|
|
newfile = '[New]', -- Text to show for newly created file before first write
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
lualine_c = {
|
2023-11-27 22:37:34 +00:00
|
|
|
{
|
2023-11-17 11:24:21 +00:00
|
|
|
'branch',
|
2024-03-01 17:57:06 +00:00
|
|
|
icon = ' '
|
2024-02-23 18:23:02 +00:00
|
|
|
},
|
2023-11-27 22:37:34 +00:00
|
|
|
{
|
|
|
|
'diff',
|
|
|
|
symbols = {
|
2023-12-08 10:42:09 +00:00
|
|
|
added = '+',
|
|
|
|
modified = '~',
|
|
|
|
removed = '-',
|
2024-02-23 18:23:02 +00:00
|
|
|
}
|
2024-03-01 17:57:06 +00:00
|
|
|
},
|
2024-02-25 17:12:48 +00:00
|
|
|
},
|
2024-03-01 17:57:06 +00:00
|
|
|
lualine_x = {
|
2023-11-27 22:37:34 +00:00
|
|
|
{
|
2024-02-23 18:23:02 +00:00
|
|
|
'diagnostics',
|
2023-11-27 22:37:34 +00:00
|
|
|
symbols = {
|
2024-02-23 18:23:02 +00:00
|
|
|
error = options.lsp.icons.Error,
|
|
|
|
warn = options.lsp.icons.Warn,
|
|
|
|
info = options.lsp.icons.Info,
|
|
|
|
hint = options.lsp.icons.Hint,
|
2023-11-17 11:24:21 +00:00
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
sources = {
|
|
|
|
'nvim_diagnostic'
|
|
|
|
},
|
|
|
|
update_in_insert = true
|
2024-02-25 17:12:48 +00:00
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
{
|
|
|
|
function ()
|
|
|
|
local client_id = vim.lsp.get_client_by_id(1)
|
2024-03-01 17:57:06 +00:00
|
|
|
return ' LSP - ' .. client_id.name
|
2024-02-23 18:23:02 +00:00
|
|
|
end,
|
|
|
|
on_click = function ()
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd("LspInfo")
|
|
|
|
end, 100)
|
|
|
|
end
|
|
|
|
},
|
2023-11-27 22:37:34 +00:00
|
|
|
'encoding',
|
|
|
|
'fileformat',
|
|
|
|
{
|
|
|
|
'filetype',
|
|
|
|
colored = true,
|
|
|
|
on_click = function(_, _)
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd("Telescope filetypes")
|
|
|
|
end, 100)
|
|
|
|
end
|
|
|
|
}
|
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
lualine_y = {'progress'},
|
|
|
|
lualine_z = {'location'}
|
2023-11-27 22:37:34 +00:00
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = {},
|
|
|
|
lualine_b = {},
|
2024-02-25 17:12:48 +00:00
|
|
|
lualine_c = {
|
|
|
|
{
|
|
|
|
'filename',
|
|
|
|
symbols = {
|
|
|
|
modified = '', -- Text to show when the file is modified.
|
|
|
|
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
|
|
|
unnamed = '', -- Text to show for unnamed buffers.
|
|
|
|
newfile = '[New]', -- Text to show for newly created file before first write
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
lualine_x = {'location'},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {}
|
|
|
|
}
|
2023-11-17 11:24:21 +00:00
|
|
|
}
|
2024-02-23 18:23:02 +00:00
|
|
|
end
|
|
|
|
}
|
2023-11-17 11:24:21 +00:00
|
|
|
}
|
2024-03-01 17:57:06 +00:00
|
|
|
|