add: config transparant background

This commit is contained in:
asep komarudin 2024-02-23 22:36:52 +07:00
parent 808891c37b
commit cc3044f070
5 changed files with 242 additions and 46 deletions

View file

@ -4,7 +4,6 @@
"alpha-nvim": { "branch": "main", "commit": "1356b9ef31b985d541d94314f2cf73c61124bf1d" },
"bufdelete.nvim": { "branch": "master", "commit": "0b9c0f182b09c51170bb9f252f15de7695e4d507" },
"bufferline.nvim": { "branch": "main", "commit": "d6cb9b7cac52887bcac65f8698e67479553c0748" },
"catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
@ -50,6 +49,8 @@
"smart-splits.nvim": { "branch": "master", "commit": "e1e1e6ca3754bd8ef971fb69673cc17965eb9e37" },
"telescope.nvim": { "branch": "master", "commit": "a5b69afa484038f1c4793e979d023edb478ebc0c" },
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
"tokyonight.nvim": { "branch": "main", "commit": "67c6050e1ca41260c919236a098ba278472c7520" },
"transparent.nvim": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" },
"vim-bbye": { "branch": "master", "commit": "903f5eb17f72ebf7b0b1524bbb792c0b36761af6" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"vim-repeat": { "branch": "master", "commit": "8106e142dfdc278ff3eaaadd7b362ad7949d4357" },

View file

@ -26,7 +26,7 @@ vim.g.pcode_colorscheme = "tokyonight"
-- dracula
-- nightfox
-- 0 =off 1= on
vim.g.pcode_transparent_mode = 0
vim.g.pcode_transparent_mode = 1
-- 0 disable progress
-- 1 lualine lsp progress

View file

@ -0,0 +1,25 @@
return {
-- "xiyaowong/transparent.nvim",
-- event = "BufWinEnter",
-- cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
-- config = function()
-- require("transparent").clear_prefix("BufferLine")
-- require("transparent").clear_prefix("Lualine")
-- require("transparent").setup({
-- extra_groups = {},
-- exclude_groups = {
-- -- disable active selection backgroun
-- "CursorLine",
-- "CursorLineNR",
-- "CursorLineSign",
-- "CursorLineFold",
-- "Pmenu",
-- "PmenuSel",
-- "PmenuSbar",
-- "PmenuThumb",
-- "NormalFloat",
-- "FloatBorder",
-- },
-- })
-- end,
}

View file

@ -214,6 +214,33 @@ if transparent_mode ~= nil then
end
return {
-- transparant config
{
"xiyaowong/transparent.nvim",
event = "BufWinEnter",
enabled = transparent,
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
config = function()
require("transparent").clear_prefix("BufferLine")
require("transparent").clear_prefix("Lualine")
require("transparent").setup({
extra_groups = {},
exclude_groups = {
-- disable active selection backgroun
"CursorLine",
"CursorLineNR",
"CursorLineSign",
"CursorLineFold",
"Pmenu",
"PmenuSel",
"PmenuSbar",
"PmenuThumb",
"NormalFloat",
"FloatBorder",
},
})
end,
},
-- color scheme
{ "luisiacc/gruvbox-baby", lazy = true, enabled = gruvbox },
{

View file

@ -228,7 +228,56 @@ if data_exists then
lsp_progress = lspprogress.progress
end
lualine.setup({
local transparent_mode = require("core.config").transparent_mode
if transparent_mode ~= nil then
if transparent_mode == 1 then
lualine.setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
"TelescopePrompt",
"packer",
"alpha",
"dashboard",
"NvimTree",
"Outline",
"DressingInput",
"toggleterm",
"lazy",
"mason",
"neo-tree",
},
always_divide_middle = true,
},
sections = {
lualine_a = {},
lualine_b = { mode, branch },
lualine_c = { lsp_info, diagnostics, lsp_progress },
-- lualine_c = { file_name, lsp_info },
-- lualine_x = { "encoding", "fileformat", "filetype" },
-- lualine_x = { diff, spaces, "encoding", filetype },
lualine_x = { diff, spaces, filetype },
lualine_y = { location, time },
--[[ lualine_z = { progress }, ]]
lualine_z = {},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
extensions = {},
})
else
lualine.setup({
options = {
icons_enabled = true,
theme = "auto",
@ -272,4 +321,98 @@ lualine.setup({
},
tabline = {},
extensions = {},
})
})
end
else
lualine.setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = component_separators,
section_separators = section_separators,
disabled_filetypes = {
"TelescopePrompt",
"packer",
"alpha",
"dashboard",
"NvimTree",
"Outline",
"DressingInput",
"toggleterm",
"lazy",
"mason",
"neo-tree",
},
always_divide_middle = true,
},
sections = {
lualine_a = { mode },
lualine_b = { branch },
lualine_c = { lsp_info, diagnostics, lsp_progress },
-- lualine_c = { file_name, lsp_info },
-- lualine_x = { "encoding", "fileformat", "filetype" },
-- lualine_x = { diff, spaces, "encoding", filetype },
lualine_x = { diff, spaces, filetype },
lualine_y = { location },
--[[ lualine_z = { progress }, ]]
lualine_z = { time },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
extensions = {},
})
end
-- lualine.setup({
-- options = {
-- icons_enabled = true,
-- theme = "auto",
-- component_separators = component_separators,
-- section_separators = section_separators,
-- disabled_filetypes = {
-- "TelescopePrompt",
-- "packer",
-- "alpha",
-- "dashboard",
-- "NvimTree",
-- "Outline",
-- "DressingInput",
-- "toggleterm",
-- "lazy",
-- "mason",
-- "neo-tree",
-- },
-- always_divide_middle = true,
-- },
--
-- sections = {
-- lualine_a = { mode },
-- lualine_b = { branch },
-- lualine_c = { lsp_info, diagnostics, lsp_progress },
-- -- lualine_c = { file_name, lsp_info },
-- -- lualine_x = { "encoding", "fileformat", "filetype" },
-- -- lualine_x = { diff, spaces, "encoding", filetype },
-- lualine_x = { diff, spaces, filetype },
-- lualine_y = { location },
-- --[[ lualine_z = { progress }, ]]
-- lualine_z = { time },
-- },
-- inactive_sections = {
-- lualine_a = {},
-- lualine_b = {},
-- lualine_c = { "filename" },
-- lualine_x = { "location" },
-- lualine_y = {},
-- lualine_z = {},
-- },
-- tabline = {},
-- extensions = {},
-- })