From 0e91b88c1a29d35f5a23f09452eec47ffbfcb4ba Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Fri, 19 Jul 2024 00:04:09 -0300 Subject: [PATCH] feat: add lualine with custom theme adapted from bibjaw99 --- lua/custom/plugins/bufferline.lua | 14 ++-- lua/custom/plugins/colorscheme.lua | 4 +- lua/custom/plugins/lualine.lua | 105 +++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 9 deletions(-) diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua index 0a7c580..e1c37ce 100644 --- a/lua/custom/plugins/bufferline.lua +++ b/lua/custom/plugins/bufferline.lua @@ -1,9 +1,9 @@ return { - 'akinsho/bufferline.nvim', - version = "*", - dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" }, - event = "BufEnter", - config = function() - require('bufferline').setup({}) - end + -- 'akinsho/bufferline.nvim', + -- version = "*", + -- dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" }, + -- event = "BufEnter", + -- config = function() + -- require('bufferline').setup({}) + -- end } diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index e84f3cf..30164ca 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -124,11 +124,11 @@ elseif fileContent == "solarized" then require('solarized').setup({ enables = { bufferline = true, - cmp = true, + cmp = true }, pallete = "solarized", theme = "neo", - transparent = false, + transparent = true, }) vim.cmd.colorscheme 'solarized' diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua index a84272e..8d62999 100644 --- a/lua/custom/plugins/lualine.lua +++ b/lua/custom/plugins/lualine.lua @@ -1,4 +1,109 @@ return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local lualine = require("lualine") + + local colors = { + blue = "#268bd2", + green = "#859900", + violet = "#6c71c4", + yellow = "#b58900", + red = "#dc332f", + cream = "#fdf6e3", + black = "#002b36", + grey = "#073642", + dark = "#002b36", + } + + local solarized = { + normal = { + a = { bg = colors.dark, fg = colors.cream, gui = "bold" }, + c = { bg = colors.grey, fg = colors.cream, gui = "bold" }, + }, + insert = { + a = { bg = colors.grey, fg = colors.cream, gui = "bold" }, + c = { bg = colors.black, fg = colors.cream, gui = "bold" }, + }, + visual = { + a = { bg = colors.violet, fg = colors.black, gui = "bold" }, + c = { bg = colors.dark, fg = colors.cream, gui = "bold" }, + }, + command = { + a = { bg = colors.green, fg = colors.black, gui = "bold" }, + c = { bg = colors.black, fg = colors.cream, gui = "bold" }, + }, + replace = { + a = { bg = colors.blue, fg = colors.black, gui = "bold" }, + c = { bg = colors.black, fg = colors.cream, gui = "bold" }, + }, + inactive = { + a = { bg = colors.green, fg = colors.black, gui = "bold" }, + c = { bg = colors.black, fg = colors.cream, gui = "bold" }, + }, + } + + -- configure lualine with modified theme + lualine.setup({ + options = { + theme = solarized, + component_separators = { left = "", right = "|" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_a = { + "mode", + "branch", + "diff", + "diagnostics", + { + -- "buffers", + -- buffers_color = { + -- active = { bg = colors.yellow, fg = colors.black, gui = "bold" }, + -- inactive = { bg = colors.grey, fg = colors.cream, gui = "italic" }, + -- }, + symbols = { + modified = " ●", + alternate_file = " ", + directory = "", + }, + mode = 2, + }, + }, + lualine_b = {}, + lualine_c = { + { + "filename", + file_status = true, + path = 3, + }, + }, + lualine_x = {}, + lualine_y = {}, + lualine_z = { + "searchcount", + "selectioncount", + "encoding", + "fileformat", + "filetype", + "progress", + "location", + }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {}, + }) + end, }