mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(neovim): Replace lualine with mini.statusline & move all mini.nvim
plugins to `utility-plugs` - Switched for easier configuration & reduction in number of plugins - `mini.nvim` now does way too many things to be in `code-generic`
This commit is contained in:
@@ -193,118 +193,6 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- Set lualine as statusline
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
cond = require("config.util").is_not_vscode(),
|
||||
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()
|
||||
local lualine_require = require("lualine_require")
|
||||
lualine_require.require = require
|
||||
vim.o.laststatus = vim.g.lualine_laststatus
|
||||
|
||||
local config = require("config.util")
|
||||
|
||||
return {
|
||||
options = {
|
||||
theme = "auto",
|
||||
icons_enabled = true,
|
||||
globalstatus = true,
|
||||
component_separators = "|",
|
||||
section_separators = "",
|
||||
},
|
||||
extensions = { "neo-tree", "lazy" },
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = {
|
||||
"branch",
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = config.icons.git.added,
|
||||
modified = config.icons.git.modified,
|
||||
removed = config.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_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = config.icons.diagnostics.ERROR,
|
||||
warn = config.icons.diagnostics.WARN,
|
||||
info = config.icons.diagnostics.INFO,
|
||||
hint = config.icons.diagnostics.HINT,
|
||||
},
|
||||
},
|
||||
{
|
||||
function()
|
||||
return " " .. require("dap").status()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["dap"] and require("dap").status() ~= ""
|
||||
end,
|
||||
color = config.fg("Debug"),
|
||||
},
|
||||
},
|
||||
|
||||
lualine_x = {
|
||||
{
|
||||
function()
|
||||
return require("noice").api.status.command.get()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["noice"] and require("noice").api.status.command.has()
|
||||
end,
|
||||
color = config.fg("Statement"),
|
||||
},
|
||||
{
|
||||
function()
|
||||
return require("noice").api.status.mode.get()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["noice"] and require("noice").api.status.mode.has()
|
||||
end,
|
||||
color = config.fg("Constant"),
|
||||
},
|
||||
},
|
||||
|
||||
lualine_y = {
|
||||
{
|
||||
"filename",
|
||||
file_status = true,
|
||||
path = 1,
|
||||
},
|
||||
{ "filetype", padding = { left = 1, right = 1 } },
|
||||
},
|
||||
lualine_z = {
|
||||
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- Indent guides for Neovim
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
|
||||
Reference in New Issue
Block a user