2024-05-22 20:42:09 +07:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
local component = require "user.utils.lualine_component"
|
|
|
|
local treesitter = component.treesitter
|
|
|
|
local lsp_info = component.lsp_info
|
|
|
|
local diagnostics = component.diagnostics
|
|
|
|
local diff = component.diff
|
|
|
|
local spaces = component.spaces
|
|
|
|
local get_branch = component.get_branch
|
|
|
|
local lsp_progress = {}
|
|
|
|
local data_ok, lspprogress = pcall(require, "lsp-progress")
|
|
|
|
if data_ok then
|
|
|
|
lsp_progress = lspprogress.progress
|
|
|
|
end
|
2024-06-05 12:28:31 +07:00
|
|
|
local codeium = component.codeium
|
2024-05-22 20:42:09 +07:00
|
|
|
|
|
|
|
M.filetype = {
|
|
|
|
"TelescopePrompt",
|
|
|
|
"packer",
|
|
|
|
"alpha",
|
|
|
|
"dashboard",
|
|
|
|
"NvimTree",
|
|
|
|
"Outline",
|
|
|
|
"DressingInput",
|
|
|
|
"toggleterm",
|
|
|
|
"lazy",
|
|
|
|
"mason",
|
|
|
|
"neo-tree",
|
|
|
|
"startuptime",
|
|
|
|
"crunner",
|
2024-05-30 19:52:17 +07:00
|
|
|
"lspinfo",
|
2024-05-22 20:42:09 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
M.rounded = function(colorscheme)
|
|
|
|
local mode = component.mode_rounded
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = colorscheme,
|
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
disabled_filetypes = M.filetype,
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
mode,
|
|
|
|
},
|
|
|
|
lualine_b = { get_branch },
|
|
|
|
lualine_c = { diff, lsp_info, lsp_progress },
|
2024-06-05 12:28:31 +07:00
|
|
|
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
|
2024-05-22 20:42:09 +07:00
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = {
|
|
|
|
{ "location", separator = { right = " " }, padding = 1 },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { "filename" },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {},
|
|
|
|
lualine_x = {},
|
2024-05-23 14:15:21 +07:00
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
|
|
|
tabline = {},
|
|
|
|
extensions = {},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
M.roundedall = function(colorscheme)
|
|
|
|
local mode = component.mode_roundedall
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = colorscheme,
|
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
disabled_filetypes = M.filetype,
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
mode,
|
|
|
|
},
|
|
|
|
lualine_b = { get_branch },
|
|
|
|
lualine_c = { diff, lsp_info, lsp_progress },
|
2024-06-05 12:28:31 +07:00
|
|
|
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
|
2024-05-23 14:15:21 +07:00
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = {
|
|
|
|
{ "location", separator = { right = " ", left = "" }, padding = 1 },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { "filename" },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {},
|
|
|
|
lualine_x = {},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
|
|
|
tabline = {},
|
|
|
|
extensions = {},
|
|
|
|
}
|
|
|
|
end
|
2024-05-23 18:08:15 +07:00
|
|
|
|
2024-05-23 14:15:21 +07:00
|
|
|
M.triangle = function(colorscheme)
|
|
|
|
local mode = component.mode_triangle
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = colorscheme,
|
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
disabled_filetypes = M.filetype,
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
mode,
|
|
|
|
},
|
|
|
|
lualine_b = { get_branch },
|
|
|
|
lualine_c = { diff, lsp_info, lsp_progress },
|
2024-06-05 12:28:31 +07:00
|
|
|
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
|
2024-05-23 14:15:21 +07:00
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = {
|
|
|
|
{ "location", separator = { right = " ", left = "" }, padding = 1 },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { "filename" },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {},
|
|
|
|
lualine_x = {},
|
2024-05-22 20:42:09 +07:00
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
|
|
|
tabline = {},
|
|
|
|
extensions = {},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2024-05-23 18:08:15 +07:00
|
|
|
M.parallelogram = function(colorscheme)
|
|
|
|
local mode = component.mode_parallelogram
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = colorscheme,
|
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
disabled_filetypes = M.filetype,
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
mode,
|
|
|
|
},
|
|
|
|
lualine_b = { get_branch },
|
|
|
|
lualine_c = { diff, lsp_info, lsp_progress },
|
2024-06-05 12:28:31 +07:00
|
|
|
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
|
2024-05-23 18:08:15 +07:00
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = {
|
2024-05-23 21:02:23 +07:00
|
|
|
{ "location", separator = { right = " ", left = "" }, padding = 1 },
|
2024-05-23 18:08:15 +07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { "filename" },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {},
|
|
|
|
lualine_x = {},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
|
|
|
tabline = {},
|
|
|
|
extensions = {},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2024-05-22 20:42:09 +07:00
|
|
|
M.square = function(colorscheme)
|
|
|
|
local mode = component.mode_square
|
|
|
|
return {
|
|
|
|
options = {
|
|
|
|
theme = colorscheme,
|
|
|
|
component_separators = { left = "", right = "" },
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
disabled_filetypes = M.filetype,
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {
|
|
|
|
mode,
|
|
|
|
},
|
|
|
|
lualine_b = { get_branch },
|
|
|
|
lualine_c = { diff, lsp_info, lsp_progress },
|
2024-06-05 12:28:31 +07:00
|
|
|
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
|
2024-05-22 20:42:09 +07:00
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = {
|
2024-05-23 18:08:15 +07:00
|
|
|
{ "location", separator = { right = " " }, padding = 1 },
|
2024-05-22 20:42:09 +07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { "filename" },
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {},
|
|
|
|
lualine_x = {},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
|
|
|
tabline = {},
|
|
|
|
extensions = {},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|