Commit Graph

5 Commits

Author SHA1 Message Date
shadmansaleh 32727039a9 |DEPRECATION| enhance(themes): Auto colorscheme detection and more
- `auto` theme now auto loads available theme for colorschme based on
  g:color_name . If that fails then it generates a theme for that
  colorschme like before.
- Theme from external source is preferred over bundled version in
  lualine . This means if user has a colorschme that provided the same
  theme as lualine the one from colorschme will be loaded.
- Default value of theme is changed to `auto` from `gruvbox`.
- Now when users theme from config fails lualine will fallbavk to
  `auto`. If `auto` fails then lualine will fallback to `gruvbox`
- Some themes have been renamed to their actual name (g:color_name).
  older names have been deprecated. [DEPRECATION]
    oceanicnext -> OceanicNext
    papercolor -> PaperColor
    tomorrow -> Tomorrow
    gruvbox_material -> gruvbox-material
    modus_vivendi -> modus-vivendi
- A few more adaptive themes added (aye, gruvbox, iceberg)
- Updated THEMES.md to reflect changes in theme name
2021-08-14 12:35:08 +06:00
J. Bromley f1dbb2f4a8 Fixed using 'auto' theme with default colorscheme.
When setting theme to 'auto' and using the default colorscheme, lualine
would report "theme not found, defaulting to gruvbox". Fixed by checking
that we get an actual color back when calling utils.extract_highlight_colors
before attempting to apply a brightness modifier.

* Fix brightness_modifier application.

The brightness_modifer() should only be applied when a normal color was
found.

* Apply brightness modifier when normal color not nil.

Moved application of brightness_modifier outside the if statement that
negates the brightness modifier. The modifier will now be applied when
get_color_brightness returns < 0.5.
2021-07-29 22:47:07 +06:00
Shadman 4f53d053a1
Refactor: Remove cterm from hlighlight extractor (#174)
- remove cterm color extraction
- fix lint issues
- apply lua-format
2021-04-13 18:36:51 +06:00
hoob3rt b31b66fa79 refactor: applied lua-format to all files 2021-03-16 00:37:46 +01:00
Shadman 87899eefc5
feat: add automatic theme generation (#104) 2021-03-02 14:01:34 +01:00