mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-17 04:24:20 +01:00
Merge pull request #71 from 2KAbhishek/feat/transparent-neovim-bg
Transparent Neovim background for all themes
This commit is contained in:
@@ -4,6 +4,7 @@ sudo apt install -y neovim
|
||||
|
||||
if [ ! -d "$HOME/.config/nvim" ]; then
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
cp ~/.local/share/omakub/themes/neovim/commons.lua ~/.config/nvim/lua/plugins/
|
||||
cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua
|
||||
|
||||
# Enable default extras
|
||||
|
||||
@@ -4,6 +4,7 @@ return {
|
||||
opts = {
|
||||
transparent_background = true,
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
|
||||
31
themes/neovim/commons.lua
Normal file
31
themes/neovim/commons.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local commons = {}
|
||||
|
||||
commons.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' })
|
||||
|
||||
-- hides `~` at the end of the buffer
|
||||
vim.cmd([[set fillchars+=eob:\ ]])
|
||||
end
|
||||
|
||||
return commons
|
||||
@@ -6,5 +6,6 @@ return {
|
||||
colorscheme = "everforest",
|
||||
background = "soft",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ return {
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ return {
|
||||
opts = {
|
||||
colorscheme = "kanagawa",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ return {
|
||||
opts = {
|
||||
colorscheme = "nord",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ return {
|
||||
opts = {
|
||||
colorscheme = "rose-pine-dawn",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ return {
|
||||
sidebars = "transparent",
|
||||
floats = "transparent",
|
||||
},
|
||||
config = require('plugins.commons').set_transparent_bg()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user