[UPDATED] Merged the default lazy vim config with bubbles and some customizations

This commit is contained in:
Daveanand Mannie
2024-10-26 15:20:40 -04:00
parent 44ab2631c0
commit 3e4f56774e

View File

@@ -1,69 +1,125 @@
return {
{
'nvim-lualine/lualine.nvim',
opts = function()
-- Colors and theme setup
local colors = {
blue = '#80a0ff',
cyan = '#79dac8',
black = '#080808',
white = '#c6c6c6',
red = '#ff5189',
violet = '#d183e8',
grey = '#303030',
}
local bubbles_theme = {
normal = {
a = { fg = colors.black, bg = colors.violet },
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.white },
},
insert = { a = { fg = colors.black, bg = colors.blue } },
visual = { a = { fg = colors.black, bg = colors.cyan } },
replace = { a = { fg = colors.black, bg = colors.red } },
inactive = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.black },
c = { fg = colors.white },
},
}
return {
options = {
theme = bubbles_theme,
component_separators = '',
section_separators = { left = '', right = '' },
},
sections = {
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
lualine_b = { 'branch', 'diagnostics' },
lualine_c = {
'%=', { 'filename', path = 1 }
},
lualine_x = {},
lualine_y = {
{
'diff',
colored = true,
symbols = { added = '', modified = '✏️ ', removed = '' }
},
'encoding', 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
}
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
init = function()
vim.g.lualine_laststatus = vim.o.laststatus
if vim.fn.argc(-1) > 0 then
-- set an empty statusline till lualine loads
vim.o.statusline = " "
else
-- hide the statusline on the starter page
vim.o.laststatus = 0
end
}
end,
opts = function()
-- Colors and theme setup
local colors = {
blue = "#80a0ff",
cyan = "#79dac8",
black = "#080808",
white = "#c6c6c6",
red = "#ff5189",
violet = "#d183e8",
grey = "#303030",
}
local bubbles_theme = {
normal = {
a = { fg = colors.black, bg = colors.violet },
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.white },
},
insert = { a = { fg = colors.black, bg = colors.blue } },
visual = { a = { fg = colors.black, bg = colors.cyan } },
replace = { a = { fg = colors.black, bg = colors.red } },
inactive = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.black },
c = { fg = colors.white },
},
}
local icons = LazyVim.config.icons
vim.o.laststatus = vim.g.lualine_laststatus
return {
options = {
theme = bubbles_theme,
globalstatus = vim.o.laststatus == 3,
disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter" } },
component_separators = "",
section_separators = { left = "", right = "" },
},
sections = {
lualine_a = {
{ "mode", separator = { left = "" }, right_padding = 2 },
{
function()
return require("noice").api.status.command.get()
end,
cond = function()
return package.loaded["noice"] and require("noice").api.status.command.has()
end,
color = { colors.black },
},
},
lualine_b = {
"branch",
{
"diagnostics",
symbols = {
error = icons.diagnostics.Error,
warn = icons.diagnostics.Warn,
info = icons.diagnostics.Info,
hint = icons.diagnostics.Hint,
},
},
},
lualine_c = {
"%=",
{ "filetype", icon_only = true, padding = { 0 } },
{ "filename", path = 1 },
{ "filetype", icon_only = true, padding = { 0 } },
},
lualine_x = {
{
"diff",
symbols = {
added = icons.git.added,
modified = icons.git.modified,
removed = icons.git.removed,
},
source = function()
local gitsigns = vim.b.gitsigns_status_dict
if gitsigns then
return {
added = gitsigns.added,
modified = gitsigns.changed,
removed = gitsigns.removed,
}
end
end,
},
},
lualine_y = {
"encoding",
"progress",
},
lualine_z = {
{ "location", separator = { right = "" }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = { "neo-tree", "lazy" },
}
end,
}