Skip to content

Commit

Permalink
add colorscheme
Browse files Browse the repository at this point in the history
  • Loading branch information
zztrieuzz committed Jun 19, 2022
1 parent 9c50f2c commit 48af656
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
31 changes: 31 additions & 0 deletions lua/windline/themes/gruvbox-material.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local colors = {
black = '#282828',
white = '#ebdbb2',
red = '#fb4934',
green = '#b8bb26',
blue = '#83a598',
yellow = '#fe8019',
cyan = "#00cccc",
magenta = '#c6c6c6',
black_light = '#3c3836',
white_light = '#a89984',
red_light = '#ff5a67',
yellow_light = '#fabd2f',
blue_light = "#517f8d",
magenta_light = "#c694ff",
green_light = '#7eca9c',
cyan_light = '#00ffff',

NormalFg = "#ebdbb2",
NormalBg = "#282828",
InactiveFg = '#c6c6c6',
InactiveBg = '#3c3836',
ActiveFg = '#928b95',
ActiveBg = '#282828',

TabSelectionBg= "#b8bb26",
TabSelectionFg= "#282828"
}


return colors
13 changes: 11 additions & 2 deletions lua/wlfloatline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local state = WindLine.state

local default_config = {
interval = 300,
is_nocmdheight = false,
ui = {
active_char = '',
active_color = 'blue',
Expand Down Expand Up @@ -386,6 +387,10 @@ M.floatline_hide = function(close)
end

M.floatline_on_cmd_leave = function()
if state.config.is_nocmdheight then
M.floatline_on_resize(-1)
return
end
if state.floatline.is_hide then
state.floatline.is_hide = false
if vim.v.event.cmdtype:match('[%:%-]') or vim.o.cmdheight == 0 then
Expand All @@ -396,9 +401,10 @@ M.floatline_on_cmd_leave = function()
end

M.floatline_on_cmd_enter = function()
if vim.o.cmdheight == 0 then
if state.config.is_nocmdheight then
state.floatline.is_hide = true
M.floatline_on_resize(1)
M.floatline_on_resize(0)
vim.cmd("redraw")
return
end
if vim.v.event.cmdtype:match('[%:%-]') then
Expand Down Expand Up @@ -432,6 +438,9 @@ M.setup = function(opts)
WindLine.floatline_show = M.floatline_show
WindLine.floatline_on_resize = M.floatline_on_resize
WindLine.floatline_fix_command = M.floatline_fix_command
if vim.o.cmdheight == 0 then
state.config.is_nocmdheight = true
end

vim.cmd([[set statusline=%!v:lua.WindLine.floatline_show()]])

Expand Down

0 comments on commit 48af656

Please sign in to comment.