Skip to content

Commit

Permalink
Minimal look (hide_inactive_statusline) removed from lualine
Browse files Browse the repository at this point in the history
Why?
----
Lualine now supports `tabline` and `buffers` as extension (projekt0n#97). Because
of this change lualine inherits highlights from `inactive` section of theme.
This inheritance makes some lualine highlights underlined (projekt0n#133) and
hard to see.

About Patch
-----------
This patch remove `underline` style from lualine plugin with new
background and foreground colors.
  • Loading branch information
ful1e5 committed Dec 13, 2021
1 parent 4ab803f commit b699121
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Dark background color for inactive statusline and lualine
- Minimal look (`hide_inactive_statusline`) removed from lualine

### Fixes

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ require('github-theme').setup()

## Configuration

| Option | Default | Description |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| theme_style | `dark` | Set theme variant (options: `dark`/`dark_default`/`dimmed`/`light`/`light_default`) |
| comment_style | `italic` | Highlight style for comments (check `:help highlight-args` for options) |
| keyword_style | `italic` | Highlight style for keywords (check `:help highlight-args` for options) |
| function_style | `NONE` | Highlight style for functions (check `:help highlight-args` for options) |
| variable_style | `NONE` | Highlight style for variables and identifiers (check `:help highlight-args` for options) |
| msg_area_style | `NONE` | Highlight style for messages and cmdline (check `:help highlight-args` for options) |
| transparent | `false` | Enable this to disable setting the background color |
| hide_end_of_buffer | `true` | Enabling this option, will hide filler lines (~) after the end of the buffer |
| hide_inactive_statusline | `true` | 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"}` |
| dark_sidebar | `true` | Sidebar like windows like `NvimTree` get a darker background |
| dark_float | `false` | Float windows like the lsp diagnostics windows get a darker background. |
| colors | `{}` | You can override specific color groups to use other groups or a hex color |
| Option | Default | Description |
| ------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| theme_style | `dark` | Set theme variant (options: `dark`/`dark_default`/`dimmed`/`light`/`light_default`) |
| comment_style | `italic` | Highlight style for comments (check `:help highlight-args` for options) |
| keyword_style | `italic` | Highlight style for keywords (check `:help highlight-args` for options) |
| function_style | `NONE` | Highlight style for functions (check `:help highlight-args` for options) |
| variable_style | `NONE` | Highlight style for variables and identifiers (check `:help highlight-args` for options) |
| msg_area_style | `NONE` | Highlight style for messages and cmdline (check `:help highlight-args` for options) |
| transparent | `false` | Enable this to disable setting the background color |
| hide_end_of_buffer | `true` | Enabling this option, will hide filler lines (~) after the end of the buffer |
| hide_inactive_statusline | `true` | Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine**. |
| sidebars | `{}` | Set a darker background on sidebar-like windows. For example: `{"qf", "vista_kind", "terminal", "packer"}` |
| dark_sidebar | `true` | Sidebar like windows like `NvimTree` get a darker background |
| dark_float | `false` | Float windows like the lsp diagnostics windows get a darker background. |
| colors | `{}` | You can override specific color groups to use other groups or a hex color |

```vim
" Example config in VimScript
Expand Down
17 changes: 6 additions & 11 deletions lua/github-theme/theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -550,24 +550,19 @@ function M.setup(config)
theme.defer = {}

if config.hide_inactive_statusline then
local inactive = {style = "underline", bg = c.bg, fg = c.bg, sp = c.bg_visual}
local inactive

-- StatusLine
inactive = {style = "underline", bg = c.bg, fg = c.bg, sp = c.bg_visual}
theme.base.StatusLineNC = inactive

-- LuaLine
if vim.o.statusline ~= nil and string.find(vim.o.statusline, "lualine") then
-- Fix VertSplit & StatusLine crossover when lualine is active
-- https://github.com/hoob3rt/lualine.nvim/issues/274
theme.base.StatusLine = {bg = c.bg}

-- LuaLine
for _, section in pairs({"a", "b", "c"}) do
theme.defer["lualine_" .. section .. "_inactive"] = inactive
end

-- Fix inactive tab highlights
-- https://github.com/projekt0n/github-nvim-theme/issues/133
theme.defer.lualine_tabs_active_0_no_mode = {fg = c.blue, bg = c.bg}
inactive = {bg = c.bg2}
theme.base.StatusLine = inactive
theme.base.StatusLineNC = inactive
end
end

Expand Down

0 comments on commit b699121

Please sign in to comment.