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", "fzf", "lazy" }, }, }