Skip to content

New transparency options #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ colorscheme onedark
require('onedark').setup {
-- Main options --
style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
transparent = false, -- Show/hide background
term_colors = true, -- Change terminal color as per the selected theme style
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
Expand All @@ -111,10 +110,13 @@ require('onedark').setup {
variables = 'none'
},

-- Lualine options --
lualine = {
transparent = false, -- lualine center bar transparency
},
-- Transparency options --
transparent = {
lualine = false, -- center bar (c) transparency for lualine
background = false, -- show/hide background
statusline = false, -- non lualine statusline transparency
tabline = false, -- set tabline to be transparent
}

-- Custom Highlights --
colors = {}, -- Override default colors
Expand Down
4 changes: 2 additions & 2 deletions lua/lualine/themes/onedark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ local one_dark = {
inactive = {
a = {fg = colors.gray, bg = colors.bg, gui = 'bold'},
b = {fg = colors.gray, bg = colors.bg},
c = {fg = colors.gray, bg = cfg.lualine.transparent and c.none or c.bg1},
c = {fg = colors.gray, bg = cfg.transparent.lualine and c.none or c.bg1},
},
normal = {
a = {fg = colors.bg, bg = colors.green, gui = 'bold'},
b = {fg = colors.fg, bg = c.bg3},
c = {fg = colors.fg, bg = cfg.lualine.transparent and c.none or c.bg1},
c = {fg = colors.fg, bg = cfg.transparent.lualine and c.none or c.bg1},
},
visual = {a = {fg = colors.bg, bg = colors.purple, gui = 'bold'}},
replace = {a = {fg = colors.bg, bg = colors.red, gui = 'bold'}},
Expand Down
16 changes: 8 additions & 8 deletions lua/onedark/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ local colors = {
Purple = {fg = c.purple}
}
hl.common = {
Normal = {fg = c.fg, bg = cfg.transparent and c.none or c.bg0},
Terminal = {fg = c.fg, bg = cfg.transparent and c.none or c.bg0},
EndOfBuffer = {fg = cfg.ending_tildes and c.bg2 or c.bg0, bg = cfg.transparent and c.none or c.bg0},
FoldColumn = {fg = c.fg, bg = cfg.transparent and c.none or c.bg1},
Folded = {fg = c.fg, bg = cfg.transparent and c.none or c.bg1},
SignColumn = {fg = c.fg, bg = cfg.transparent and c.none or c.bg0},
Normal = {fg = c.fg, bg = cfg.transparent.background and c.none or c.bg0},
Terminal = {fg = c.fg, bg = cfg.transparent.background and c.none or c.bg0},
EndOfBuffer = {fg = cfg.ending_tildes and c.bg2 or c.bg0, bg = cfg.transparent.background and c.none or c.bg0},
FoldColumn = {fg = c.fg, bg = cfg.transparent.background and c.none or c.bg1},
Folded = {fg = c.fg, bg = cfg.transparent.background and c.none or c.bg1},
SignColumn = {fg = c.fg, bg = cfg.transparent.background and c.none or c.bg0},
ToolbarLine = {fg = c.fg},
Cursor = {fmt = "reverse"},
vCursor = {fmt = "reverse"},
Expand Down Expand Up @@ -76,12 +76,12 @@ hl.common = {
SpellCap = {fg = c.none, fmt = "undercurl", sp = c.yellow},
SpellLocal = {fg = c.none, fmt = "undercurl", sp = c.blue},
SpellRare = {fg = c.none, fmt = "undercurl", sp = c.purple},
StatusLine = {fg = c.fg, bg = c.bg2},
StatusLine = {fg = c.fg, bg = cfg.transparent.statusline and c.none or c.bg1},
StatusLineTerm = {fg = c.fg, bg = c.bg2},
StatusLineNC = {fg = c.grey, bg = c.bg1},
StatusLineTermNC = {fg = c.grey, bg = c.bg1},
TabLine = {fg = c.fg, bg = c.bg1},
TabLineFill = {fg = c.grey, bg = c.bg1},
TabLineFill = {fg = c.grey, bg = cfg.transparent.tabline and c.none or c.bg2},
TabLineSel = {fg = c.bg0, bg = c.fg},
VertSplit = {fg = c.bg3},
Visual = {bg = c.bg3},
Expand Down
11 changes: 7 additions & 4 deletions lua/onedark/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ local default_config = {
style = 'dark', -- choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
toggle_style_key = nil,
toggle_style_list = M.styles_list,
transparent = false, -- don't set background
--transparent = false, -- don't set background
term_colors = true, -- if true enable the terminal
ending_tildes = false, -- show the end-of-buffer tildes
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
Expand All @@ -60,9 +60,12 @@ local default_config = {
variables = 'none'
},

-- Lualine options --
lualine = {
transparent = false, -- center bar (c) transparency
-- Transparency options --
transparent = {
lualine = false, -- center bar (c) transparency
background = false, -- don't set background
statusline = false, -- non lualine statusline transparency
tabline = false, -- set tabline to be transparent
},

-- Custom Highlights --
Expand Down