local colors = { bg = "none", fg = "#ebdbb2", yellow = "#fabd2f", cyan = "#8ec07c", darkblue = "#458588", green = "#b8bb26", orange = "#fe8019", violet = "#d3869b", magenta = "#d3869b", blue = "#83a598", red = "#fb4934", grey = "#504945", black = "#282828", white = "#fbf1c7", darkgrey = "#3c3836", lightgrey = "#665c54", } local theme = { normal = { a = { fg = colors.black, bg = colors.blue, gui = "bold" }, b = { fg = colors.blue, bg = colors.grey }, c = { fg = colors.white, bg = colors.darkgrey }, x = { fg = colors.white, bg = colors.darkgrey }, y = { fg = colors.blue, bg = colors.grey }, z = { fg = colors.black, bg = colors.blue, gui = "bold" }, }, insert = { a = { fg = colors.black, bg = colors.green, gui = "bold" }, b = { fg = colors.green, bg = colors.grey }, c = { fg = colors.white, bg = colors.darkgrey }, x = { fg = colors.white, bg = colors.darkgrey }, y = { fg = colors.green, bg = colors.grey }, z = { fg = colors.black, bg = colors.green, gui = "bold" }, }, visual = { a = { fg = colors.black, bg = colors.magenta, gui = "bold" }, b = { fg = colors.magenta, bg = colors.grey }, c = { fg = colors.white, bg = colors.darkgrey }, x = { fg = colors.white, bg = colors.darkgrey }, y = { fg = colors.magenta, bg = colors.grey }, z = { fg = colors.black, bg = colors.magenta, gui = "bold" }, }, replace = { a = { fg = colors.black, bg = colors.red, gui = "bold" }, b = { fg = colors.red, bg = colors.grey }, c = { fg = colors.white, bg = colors.darkgrey }, x = { fg = colors.white, bg = colors.darkgrey }, y = { fg = colors.red, bg = colors.grey }, z = { fg = colors.black, bg = colors.red, gui = "bold" }, }, command = { a = { fg = colors.black, bg = colors.yellow, gui = "bold" }, b = { fg = colors.yellow, bg = colors.grey }, c = { fg = colors.white, bg = colors.darkgrey }, x = { fg = colors.white, bg = colors.darkgrey }, y = { fg = colors.yellow, bg = colors.grey }, z = { fg = colors.black, bg = colors.yellow, gui = "bold" }, }, inactive = { a = { fg = colors.white, bg = colors.darkgrey }, b = { fg = colors.white, bg = colors.darkgrey }, c = { fg = colors.white, bg = colors.darkgrey }, }, } 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" }, }, }