Files
dotfiles/nvim/lua/plugins/lualine.lua
Thomas Naderer 61b1e3d2a9 refactor(nvim): modernize plugin stack
Removed dead weight:
- Drop nightfox, rose-pine, kanagawa, everforest colorschemes
- Remove fzf/fzf.vim (redundant with telescope)
- Remove vim-fugitive and its keymaps (lazygit covers this)
- Remove Comment.nvim (built into nvim 0.10+)

Replaced:
- nvim-cmp → blink.cmp (Rust-powered, faster, ghost text)
- none-ls/null-ls → conform.nvim (async, maintained)
- cmp-nvim-lsp capabilities → blink.cmp.get_lsp_capabilities()
- Copilot suggestions now routed through blink-copilot

Added:
- lazydev.nvim for proper Lua LSP in nvim config
- flash.nvim (s/S jump anywhere on screen)
- which-key.nvim (leader key popup with groups)
- snacks.nvim (notifier + word highlights)
- nvim-treesitter-textobjects (af/if, ac/ic, ]f/[f)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 21:26:55 +01:00

193 lines
5.5 KiB
Lua

local colors = {
base = "#1e1e2e",
surface0 = "#313244",
surface1 = "#45475a",
overlay0 = "#6c7086",
text = "#cdd6f4",
subtext = "#a6adc8",
crust = "#11111b",
mauve = "#cba6f7",
blue = "#89b4fa",
green = "#a6e3a1",
red = "#f38ba8",
yellow = "#f9e2af",
peach = "#fab387",
lavender = "#b4befe",
cyan = "#94e2d5",
}
local theme = {
normal = {
a = { fg = colors.crust, bg = colors.mauve, gui = "bold" },
b = { fg = colors.mauve, bg = colors.surface1 },
c = { fg = colors.text, bg = colors.base },
x = { fg = colors.text, bg = colors.base },
y = { fg = colors.mauve, bg = colors.surface1 },
z = { fg = colors.crust, bg = colors.mauve, gui = "bold" },
},
insert = {
a = { fg = colors.crust, bg = colors.green, gui = "bold" },
b = { fg = colors.green, bg = colors.surface1 },
c = { fg = colors.text, bg = colors.base },
x = { fg = colors.text, bg = colors.base },
y = { fg = colors.green, bg = colors.surface1 },
z = { fg = colors.crust, bg = colors.green, gui = "bold" },
},
visual = {
a = { fg = colors.crust, bg = colors.lavender, gui = "bold" },
b = { fg = colors.lavender, bg = colors.surface1 },
c = { fg = colors.text, bg = colors.base },
x = { fg = colors.text, bg = colors.base },
y = { fg = colors.lavender, bg = colors.surface1 },
z = { fg = colors.crust, bg = colors.lavender, gui = "bold" },
},
replace = {
a = { fg = colors.crust, bg = colors.red, gui = "bold" },
b = { fg = colors.red, bg = colors.surface1 },
c = { fg = colors.text, bg = colors.base },
x = { fg = colors.text, bg = colors.base },
y = { fg = colors.red, bg = colors.surface1 },
z = { fg = colors.crust, bg = colors.red, gui = "bold" },
},
command = {
a = { fg = colors.crust, bg = colors.yellow, gui = "bold" },
b = { fg = colors.yellow, bg = colors.surface1 },
c = { fg = colors.text, bg = colors.base },
x = { fg = colors.text, bg = colors.base },
y = { fg = colors.yellow, bg = colors.surface1 },
z = { fg = colors.crust, bg = colors.yellow, gui = "bold" },
},
inactive = {
a = { fg = colors.subtext, bg = colors.base },
b = { fg = colors.subtext, bg = colors.base },
c = { fg = colors.subtext, bg = colors.base },
},
}
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "VeryLazy",
opts = {
options = {
icons_enabled = true,
theme = theme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = true,
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
},
},
sections = {
lualine_a = {
{
"mode",
fmt = function(str)
local mode_map = {
["NORMAL"] = "N",
["INSERT"] = "I",
["VISUAL"] = "V",
["V-LINE"] = "VL",
["V-BLOCK"] = "VB",
["COMMAND"] = "C",
["REPLACE"] = "R",
["TERMINAL"] = "T"
}
return mode_map[str] or str
end,
separator = { right = "" }
}
},
lualine_b = {
{
"branch",
icon = "󰘬",
separator = { right = "" }
},
{
"diff",
symbols = { added = "󰐕 ", modified = "󰝤 ", removed = "󰍵 " },
separator = { right = "" }
},
{
"diagnostics",
symbols = { error = "󰅚 ", warn = "󰀪 ", info = "󰋽 ", hint = "󰌶 " },
separator = { right = "" }
}
},
lualine_c = {
{
"filename",
path = 1,
shorting_target = 40,
symbols = { modified = "󰏫", readonly = "󰌾", unnamed = "󰡯" }
}
},
lualine_x = {
{
function()
local clients = vim.lsp.get_clients()
if next(clients) == nil then
return ""
end
local client_names = {}
for _, client in pairs(clients) do
table.insert(client_names, client.name)
end
return "󰅠 " .. table.concat(client_names, ", ")
end,
color = { fg = colors.cyan },
separator = { left = "" }
},
{
"filesize",
cond = function() return vim.fn.getfsize(vim.fn.expand('%:p')) > 0 end,
separator = { left = "" }
},
{
"encoding",
cond = function() return vim.bo.fileencoding ~= 'utf-8' end,
separator = { left = "" }
},
{
"filetype",
icons_enabled = true,
separator = { left = "" }
}
},
lualine_y = {
{
"progress",
separator = { left = "" }
}
},
lualine_z = {
{
"location",
separator = { left = "" }
}
},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { { "filename", path = 1 } },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = { "nvim-tree", "lazy" },
},
}