Skip to content

Commit

Permalink
Merge pull request #46 from ful1e5/main
Browse files Browse the repository at this point in the history
`hideEndOfBuffer` options added
  • Loading branch information
ful1e5 committed Jul 23, 2021
2 parents 6b30c4a + 05a972b commit 0fddb11
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `github-theme.util.color_overrides` function support "NONE" color (fix related to #36)
- Terminal themes are structured through `extra/init.lua`
- Area for messages and cmdline with `bold` text highlight
- `hideEndOfBuffer` options added. Enabling this option, will hide filler lines (~) after the end of the buffer

### Fixes

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ require('lualine').setup {
| functionStyle | `NONE` | Highlight style for functions (check `:help highlight-args` for options) |
| variableStyle | `NONE` | Highlight style for variables and identifiers (check `:help highlight-args` for options) |
| transparent | `false` | Enable this to disable setting the background color |
| hideEndOfBuffer | `true` | Enabling this option, will hide filler lines (~) after the end of the buffer |
| hideInactiveStatusline | `false` | Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. |
| sidebars | `{}` | Set a darker background on sidebar-like windows. For example: `{"qf", "vista_kind", "terminal", "packer"}` |
| darkSidebar | `true` | Sidebar like windows like `NvimTree` get a darker background |
Expand Down
7 changes: 7 additions & 0 deletions lua/github-theme/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ function M.setup(config)
util.bg = colors.bg
colors.bg = config.transparent and colors.none or colors.bg

-- EndOfBuffer colors are configurable
colors.sidebar_eob = config.darkSidebar and colors.bg2 or colors.bg
colors.sidebar_eob = config.hideEndOfBuffer and colors.sidebar_eob or colors.fg_light
colors.sidebar_eob = config.transparent and colors.fg_light or colors.sidebar_eob
colors.eob = config.hideEndOfBuffer and colors.bg or colors.fg_light
colors.eob = config.transparent and colors.fg_light or colors.eob

colors.fg_search = colors.none
colors.border_highlight = colors.blue
colors.bg_statusline = colors.blue
Expand Down
1 change: 1 addition & 0 deletions lua/github-theme/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ config = {
functionStyle = "NONE",
variableStyle = "NONE",
hideInactiveStatusline = false,
hideEndOfBuffer = true,
sidebars = {},
colors = {},
dev = false,
Expand Down
4 changes: 2 additions & 2 deletions lua/github-theme/theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function M.setup(config)
DiffChange = {bg = c.diff.change}, -- diff mode: Changed line |diff.txt|
DiffDelete = {bg = c.diff.delete}, -- diff mode: Deleted line |diff.txt|
DiffText = {bg = c.fg_gutter}, -- diff mode: Changed text within a changed line |diff.txt|
EndOfBuffer = {fg = c.bg}, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
EndOfBuffer = {fg = c.eob}, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
-- TermCursor = { }, -- cursor in a focused terminal
-- TermCursorNC= { }, -- cursor in an unfocused terminal
ErrorMsg = {fg = c.error}, -- error messages on the command line
Expand Down Expand Up @@ -374,7 +374,7 @@ function M.setup(config)

-- NvimTree
NvimTreeNormal = {fg = c.fg_light, bg = c.bg_sidebar},
NvimTreeEndOfBuffer = config.darkSidebar and {fg = c.bg2} or {fg = c.bg},
NvimTreeEndOfBuffer = {fg = c.sidebar_eob},
NvimTreeRootFolder = {fg = c.fg_light, style = "bold"},
NvimTreeGitDirty = {fg = c.git.change},
NvimTreeGitNew = {fg = c.git.add},
Expand Down

0 comments on commit 0fddb11

Please sign in to comment.