2023-11-17 11:24:21 +00:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
2024-02-23 18:23:02 +00:00
|
|
|
opts = function()
|
2024-04-13 08:49:11 +00:00
|
|
|
local options = require("options")
|
2024-02-23 18:23:02 +00:00
|
|
|
return {
|
2024-04-13 08:49:11 +00:00
|
|
|
options = {
|
2024-05-12 17:38:26 +00:00
|
|
|
theme = "auto",
|
2024-04-13 08:49:11 +00:00
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
globalstatus = true,
|
2024-03-01 17:57:06 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
{
|
|
|
|
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
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
lualine_b = {
|
|
|
|
{
|
|
|
|
"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-03-15 17:29:30 +00:00
|
|
|
},
|
2024-03-01 17:57:06 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
lualine_c = {
|
|
|
|
{
|
|
|
|
"branch",
|
|
|
|
icon = "",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"diff",
|
|
|
|
symbols = {
|
|
|
|
added = "+",
|
|
|
|
modified = "~",
|
|
|
|
removed = "-",
|
|
|
|
},
|
|
|
|
on_click = function()
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd("Gitsigns diffthis")
|
|
|
|
end, 100)
|
|
|
|
end,
|
|
|
|
},
|
2024-03-15 17:29:30 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
lualine_x = {
|
|
|
|
{
|
|
|
|
function()
|
|
|
|
local client_id = vim.lsp.get_client_by_id(1)
|
|
|
|
return " LSP ~ " .. client_id.name
|
|
|
|
end,
|
|
|
|
on_click = function()
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd("LspInfo")
|
|
|
|
end, 100)
|
|
|
|
end,
|
|
|
|
color = "lualine_c_inactive",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"diagnostics",
|
|
|
|
symbols = {
|
|
|
|
error = options.lsp.icons.Error,
|
|
|
|
warn = options.lsp.icons.Warn,
|
|
|
|
info = options.lsp.icons.Info,
|
|
|
|
hint = options.lsp.icons.Hint,
|
|
|
|
},
|
|
|
|
sources = {
|
|
|
|
"nvim_diagnostic",
|
|
|
|
},
|
|
|
|
update_in_insert = true,
|
|
|
|
on_click = function()
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd("TroubleToggle")
|
|
|
|
end, 100)
|
|
|
|
end,
|
2023-11-17 11:24:21 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
{
|
|
|
|
"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
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
"encoding",
|
|
|
|
"fileformat",
|
2024-02-23 18:23:02 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
lualine_y = {
|
|
|
|
{ "progress" },
|
2024-03-15 17:29:30 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
lualine_z = { "location" },
|
2023-11-27 22:37:34 +00:00
|
|
|
},
|
2024-04-13 08:49:11 +00:00
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = {},
|
|
|
|
lualine_b = {},
|
|
|
|
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
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
lualine_x = { "location" },
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {},
|
2024-02-25 17:12:48 +00:00
|
|
|
},
|
2024-02-23 18:23:02 +00:00
|
|
|
}
|
2024-04-13 08:49:11 +00:00
|
|
|
end,
|
|
|
|
},
|
2023-11-17 11:24:21 +00:00
|
|
|
}
|