From 9f7d4b2392b9964c9b250692851a2ddfc59de244 Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Tue, 16 Jan 2024 12:52:36 -0300 Subject: [PATCH] change config to accomodate my colorscheme script --- init.lua | 14 -- lua/custom/plugins/bufferline.lua | 4 +- lua/custom/plugins/colorscheme.lua | 58 +++++++++ lua/custom/plugins/darkrose.lua | 32 ----- lua/custom/plugins/lualine.lua | 197 +++++++++++++++++++++++++++++ lua/custom/plugins/solarized.lua | 16 --- lua/jabuxas/set.lua | 1 - 7 files changed, 257 insertions(+), 65 deletions(-) create mode 100644 lua/custom/plugins/colorscheme.lua delete mode 100644 lua/custom/plugins/darkrose.lua create mode 100644 lua/custom/plugins/lualine.lua delete mode 100644 lua/custom/plugins/solarized.lua diff --git a/init.lua b/init.lua index 835a205..97c2459 100644 --- a/init.lua +++ b/init.lua @@ -77,20 +77,6 @@ require('lazy').setup({ }, - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = true, - theme = 'moonfly', - component_separators = '|', - section_separators = '', - }, - }, - }, - { -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua index 807d9cc..d18a9fe 100644 --- a/lua/custom/plugins/bufferline.lua +++ b/lua/custom/plugins/bufferline.lua @@ -1,10 +1,10 @@ return { 'akinsho/bufferline.nvim', version = "*", - dependencies = 'nvim-tree/nvim-web-devicons', + dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" }, config = function() require("bufferline").setup({ - highlights = require("darkrose.integrations.bufferline").generate(), + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- highlights = require("darkrose.integrations.bufferline").generate(), options = { show_buffer_icons = false, } diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua new file mode 100644 index 0000000..d666f13 --- /dev/null +++ b/lua/custom/plugins/colorscheme.lua @@ -0,0 +1,58 @@ +local solarized = true +local colorscheme = {} + +if solarized then + colorscheme = { + 'maxmx03/solarized.nvim', + lazy = false, + priority = 1000, + config = function() + vim.o.background = 'light' + vim.opt.termguicolors = true + require('solarized').setup({ + theme = 'neo', + styles = { + functions = { bold = true, italic = false } + }, + }) + vim.cmd.colorscheme 'solarized' + vim.cmd [[highlight ColorColumn ctermbg=235 guibg=#435156]] + end, + } +else + colorscheme = { + "water-sucks/darkrose.nvim", + lazy = false, + dependencies = { "tjdevries/colorbuddy.vim" }, + priority = 1000, + config = function() + vim.opt.termguicolors = true + vim.cmd.colorscheme("darkrose") + vim.cmd [[highlight ColorColumn ctermbg=235 guibg=#262626]] + local Color, colors, Group, groups, styles = require('colorbuddy').setup() + + Color.new("red", "#9E4244") + Color.new("dark_red", "#6D0011") + Color.new("light_red", "#F85149") + Color.new("orange", "#A26B35") + Color.new("light_orange", "#F0883E") + Color.new("dark_purple", "#281C2B") + Color.new("magenta", "#8B2950") + Color.new("dark_pink", "#B76E79") + Color.new("pink", "#FF7979") + Color.new("light_pink", "#F6ACA7") + Color.new("gray", "#8B8B8B") + Color.new("bg", "#000000") + Color.new("bg_float", "#101010") + Color.new("bg_float_bright", "#121212") + Color.new("fg", "#C9C1C9") + Color.new("fg_gutter", "#8A95A2") + Color.new("fg_dark", "#4D5566") + + + Group.new("@neorg.links.file", colors.magenta, colors.none, styles.bold) + end + } +end + +return colorscheme diff --git a/lua/custom/plugins/darkrose.lua b/lua/custom/plugins/darkrose.lua deleted file mode 100644 index 12d67e9..0000000 --- a/lua/custom/plugins/darkrose.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - "water-sucks/darkrose.nvim", - lazy = false, - dependencies = { "tjdevries/colorbuddy.vim" }, - priority = 1000, - config = function() - vim.opt.termguicolors = true - vim.cmd.colorscheme("darkrose") - local Color, colors, Group, groups, styles = require('colorbuddy').setup() - - Color.new("red", "#9E4244") - Color.new("dark_red", "#6D0011") - Color.new("light_red", "#F85149") - Color.new("orange", "#A26B35") - Color.new("light_orange", "#F0883E") - Color.new("dark_purple", "#281C2B") - Color.new("magenta", "#8B2950") - Color.new("dark_pink", "#B76E79") - Color.new("pink", "#FF7979") - Color.new("light_pink", "#F6ACA7") - Color.new("gray", "#8B8B8B") - Color.new("bg", "#000000") - Color.new("bg_float", "#101010") - Color.new("bg_float_bright", "#121212") - Color.new("fg", "#C9C1C9") - Color.new("fg_gutter", "#8A95A2") - Color.new("fg_dark", "#4D5566") - - - Group.new("@neorg.links.file", colors.magenta, colors.none, styles.bold) - end -} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 0000000..0ea130a --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -0,0 +1,197 @@ +return { + -- "nvim-lualine/lualine.nvim", + -- config = function() + -- local c = require("darkrose.colors").get() + -- local lualine = require("lualine") + -- + -- local bg = c.bg_float_bright + -- + -- local conditions = { + -- buffer_not_empty = function() + -- return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 + -- end, + -- hide_in_width = function() + -- return vim.fn.winwidth(0) > 80 + -- end, + -- check_git_workspace = function() + -- local filepath = vim.fn.expand("%:p:h") + -- local gitdir = vim.fn.finddir(".git", filepath .. ";") + -- return gitdir and #gitdir > 0 and #gitdir < #filepath + -- end, + -- } + -- + -- -- Config + -- local config = { + -- options = { + -- -- Disable sections and component separators + -- component_separators = "", + -- section_separators = "", + -- theme = { + -- -- We are going to use lualine_c an lualine_x as the left + -- -- and right sections. Both are highlighted by c theme. + -- normal = { c = { fg = c.fg, bg = bg } }, + -- inactive = { c = { fg = c.fg, bg = bg } }, + -- }, + -- }, + -- sections = { + -- -- these are to remove the defaults + -- lualine_a = {}, + -- lualine_b = {}, + -- lualine_y = {}, + -- lualine_z = {}, + -- -- These will be filled later + -- lualine_c = {}, + -- lualine_x = {}, + -- }, + -- inactive_sections = { + -- -- these are to remove the defaults + -- lualine_a = {}, + -- lualine_b = {}, + -- lualine_y = {}, + -- lualine_z = {}, + -- lualine_c = {}, + -- lualine_x = {}, + -- }, + -- } + -- + -- -- Inserts a component in lualine_c at left section + -- local function left(component) + -- table.insert(config.sections.lualine_c, component) + -- end + -- + -- -- Inserts a component in lualine_x ot right section + -- local function right(component) + -- table.insert(config.sections.lualine_x, component) + -- end + -- + -- left({ + -- function() + -- return "▊" + -- end, + -- color = { fg = c.gray }, + -- padding = { left = 0, right = 1 }, + -- }) + -- + -- left({ + -- function() + -- return "" + -- end, + -- color = function() + -- local mode_color = { + -- n = c.red, -- Normal + -- i = c.orange, -- Insert + -- ic = c.orange, -- Completion insert + -- no = c.red, -- Operator-pending + -- c = c.dark_pink, -- Command-line + -- v = c.magenta, -- Visual + -- V = c.magenta, -- Line-wise visual + -- [""] = c.magenta, -- Block-wise visual + -- s = c.magenta, -- Select + -- S = c.magenta, -- Line-wise visual + -- [""] = c.magenta, -- Block-wise visual + -- R = c.light_pink, -- Replace + -- Rv = c.light_pink, -- Virtual replace + -- cv = c.dark_pink, -- Ex + -- r = c.red, -- Hit-enter + -- rm = c.red, -- More prompt + -- ["r?"] = c.red, -- :confirm + -- ["!"] = c.red, -- Shell command + -- t = c.red, -- Terminal + -- } + -- return { fg = mode_color[vim.fn.mode()] } + -- end, + -- padding = { right = 1 }, + -- }) + -- + -- left({ + -- "filename", + -- cond = conditions.buffer_not_empty, + -- color = { fg = c.dark_pink, gui = "bold" }, + -- }) + -- + -- left({ "location" }) + -- + -- left({ + -- function() + -- local cur = vim.fn.line(".") + -- local total = vim.fn.line("$") + -- return math.floor(cur / total * 100) .. "%%" + -- end, + -- color = { fg = c.fg, gui = "bold" }, + -- }) + -- + -- left({ + -- "diagnostics", + -- sources = { "nvim_diagnostic" }, + -- symbols = { error = " ", warn = " ", info = " ", hint = " " }, + -- diagnostics_color = { + -- error = { fg = c.error }, + -- warn = { fg = c.warning }, + -- info = { fg = c.info }, + -- hint = { fg = c.hint }, + -- }, + -- }) + -- + -- right({ + -- function() + -- if vim.api.nvim_get_vvar("hlsearch") == 1 then + -- local res = vim.fn.searchcount({ maxcount = 999, timeout = 500 }) + -- + -- if res.total > 0 then + -- return string.format("%d/%d", res.current, res.total) + -- end + -- end + -- + -- return "" + -- end, + -- }) + -- + -- right({ "filetype" }) + -- + -- right({ + -- "filesize", + -- cond = conditions.buffer_not_empty, + -- }) + -- + -- right({ + -- "o:encoding", + -- fmt = string.upper, + -- cond = conditions.hide_in_width, + -- color = { fg = c.red, gui = "bold" }, + -- }) + -- + -- right({ + -- "fileformat", + -- fmt = string.upper, + -- icons_enabled = false, + -- color = { fg = c.red, gui = "bold" }, + -- }) + -- + -- right({ + -- "branch", + -- icon = "", + -- color = { fg = c.orange, gui = "bold" }, + -- }) + -- + -- right({ + -- "diff", + -- symbols = { added = "+", modified = "~", removed = "-" }, + -- diff_color = { + -- added = { fg = c.diff.add }, + -- modified = { fg = c.diff.change }, + -- removed = { fg = c.diff.delete }, + -- }, + -- cond = conditions.hide_in_width, + -- }) + -- + -- right({ + -- function() + -- return "▊" + -- end, + -- color = { fg = c.gray }, + -- padding = { left = 1 }, + -- }) + -- + -- lualine.setup(config) + -- end, +} diff --git a/lua/custom/plugins/solarized.lua b/lua/custom/plugins/solarized.lua deleted file mode 100644 index 685251b..0000000 --- a/lua/custom/plugins/solarized.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - -- 'maxmx03/solarized.nvim', - -- lazy = false, - -- priority = 1000, - -- config = function() - -- vim.o.background = 'light' -- or 'light' - -- require('solarized').setup({ - -- transparent = true, - -- theme = 'default', - -- styles = { - -- functions = { bold = true, italic = false } - -- }, - -- }) - -- vim.cmd.colorscheme 'solarized' - -- end, -} diff --git a/lua/jabuxas/set.lua b/lua/jabuxas/set.lua index 96bbd05..f3fda36 100644 --- a/lua/jabuxas/set.lua +++ b/lua/jabuxas/set.lua @@ -30,7 +30,6 @@ vim.opt.updatetime = 50 -- colorcolumn vim.opt.colorcolumn = "80" -vim.cmd [[highlight ColorColumn ctermbg=235 guibg=#262626]] local autocmd = vim.api.nvim_create_autocmd autocmd({ "WinLeave" }, { pattern = "*", callback = function() vim.opt.colorcolumn = "0" end, }) autocmd({ "WinEnter" }, { pattern = "*", callback = function() vim.opt.colorcolumn = "80" end, })