From 11ef77be8be325fff3f473e817b321aab519aff8 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 11 Jun 2024 23:46:22 +0545 Subject: [PATCH] updates --- lua/lib/util.lua | 39 ------------------------------------- lua/plugins/ui/onedark.lua | 2 -- plugin/after/highlights.lua | 28 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 41 deletions(-) create mode 100644 plugin/after/highlights.lua diff --git a/lua/lib/util.lua b/lua/lib/util.lua index 8df31fe..52d883f 100644 --- a/lua/lib/util.lua +++ b/lua/lib/util.lua @@ -48,43 +48,4 @@ util.is_present = function(bin) return vim.fn.executable(bin) == 1 end -util.set_transparent_bg = function() - -- transparent background - vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'Terminal', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'EndOfBuffer', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'FoldColumn', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'Folded', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'SignColumn', { bg = 'none' }) - - -- transparent background for neotree - vim.api.nvim_set_hl(0, 'NeoTreeNormal', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NeoTreeNormalNC', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NeoTreeVertSplit', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NeoTreeWinSeparator', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NeoTreeEndOfBuffer', { bg = 'none' }) - - -- transparent background for nvim-tree - vim.api.nvim_set_hl(0, 'NvimTreeNormal', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NvimTreeVertSplit', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'NvimTreeEndOfBuffer', { bg = 'none' }) -end - -util.set_custom_highlights = function() - -- set hlsearch color - vim.api.nvim_set_hl(0, 'Search', { bg = '#8BCD5B', fg = '#202020' }) - vim.api.nvim_set_hl(0, 'CurSearch', { bg = '#EFBD5D', fg = '#000000' }) - vim.api.nvim_set_hl(0, 'IncSearch', { bg = '#F15664', fg = '#000000' }) - - -- set cursorline color - vim.api.nvim_set_hl(0, 'CursorLine', { bg = '#1A1A1F' }) - vim.api.nvim_set_hl(0, 'CursorColumn', { bg = '#1A1A1F' }) - - -- set visual highlight - vim.api.nvim_set_hl(0, 'Visual', { bg = '#103070' }) -end - return util diff --git a/lua/plugins/ui/onedark.lua b/lua/plugins/ui/onedark.lua index cdff98f..0b66c6f 100644 --- a/lua/plugins/ui/onedark.lua +++ b/lua/plugins/ui/onedark.lua @@ -25,5 +25,3 @@ onedark.setup({ }) onedark.load() -util.set_transparent_bg() -util.set_custom_highlights() diff --git a/plugin/after/highlights.lua b/plugin/after/highlights.lua new file mode 100644 index 0000000..24ac199 --- /dev/null +++ b/plugin/after/highlights.lua @@ -0,0 +1,28 @@ +-- transparent background +vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Terminal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'EndOfBuffer', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'FoldColumn', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'Folded', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'SignColumn', { bg = 'none' }) + +-- transparent background for nvim-tree +vim.api.nvim_set_hl(0, 'NvimTreeNormal', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NvimTreeVertSplit', { bg = 'none' }) +vim.api.nvim_set_hl(0, 'NvimTreeEndOfBuffer', { bg = 'none' }) + +-- set hlsearch color +vim.api.nvim_set_hl(0, 'Search', { bg = '#8BCD5B', fg = '#202020' }) +vim.api.nvim_set_hl(0, 'CurSearch', { bg = '#EFBD5D', fg = '#000000' }) +vim.api.nvim_set_hl(0, 'IncSearch', { bg = '#F15664', fg = '#000000' }) + +-- set cursorline color +vim.api.nvim_set_hl(0, 'CursorLine', { bg = '#1A1A1F' }) +vim.api.nvim_set_hl(0, 'CursorColumn', { bg = '#1A1A1F' }) + +-- set visual highlight +vim.api.nvim_set_hl(0, 'Visual', { bg = '#103070' }) +