Commit Graph

609 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
Shadman 570e68095e
Merge pull request #10 from shadmansaleh/enhance/add_eviline
Add evilline in repo under examples/
2021-08-14 01:39:38 +06:00
shadmansaleh 7f02a3a292 Include evil_lualine config in examples/ and fix warnings in evil_lualine 2021-08-14 01:36:14 +06:00
shadmansaleh 967ddcb5ca fix: Reloading config causing extesions to disaprear 2021-08-13 07:29:28 +06:00
shadmansaleh fcb88aebba Fix: quickfix extention not apearing 2021-08-13 07:20:56 +06:00
shadmansaleh 0f3ad7e248 fix: Branch stuck in infinite loop in windows
Solution: Using poll-watch instead of event-watch on windows.
Additionally now gitdir paths are cached as optimization

Special thanks to @Shatur for raising the issue and for testing patches.
closes #2
2021-08-09 22:44:38 +06:00
shadmansaleh dd2236cc3b Mention tsbline.nvim & nvim-bufferline in docs for tabline 2021-08-09 16:36:52 +06:00
shadmansaleh edb8c344f7 Fix: branch and diff disappearing with diagnostics.goto_next())
I've added a workaround to re sync those components when they
go out of sync . Until upstream issue is addressed this should
prevent this issue from occurring in lualine.
2021-08-09 15:11:50 +06:00
shadmansaleh f68d81d351 [Deprection] Enhance: Provide an uniform interface for color options
- Now all color related options and themes color definition have same
  semantics. They can either be a table containing values like bg,fg,gui
  or a string. When it's a string it's treated as a highlight group name
  and newly created group is linked to that group.
- Using string values to define foreground colors in options like
  color_error/color_added in diagnostics and diff component has been
  deprecated.
- Added a decent way of notifying affected users of deprecations and
  breaking changes.
2021-08-09 14:03:12 +06:00
shadmansaleh d541574028 chore: fix lint error 2021-08-08 23:50:44 +06:00
shadmansaleh 1816bc8622 [Breaking] Refactor: Removed viml like g:lualine styled config
This was deprecated for a while .
2021-08-08 23:44:07 +06:00
shadmansaleh fac96d71cc [Breaking] Refactor: switch to %{%expr%} from %!expr
Huge change to internal mechanics.
- Now %{%expr%} blocks are used for evaluating statusline instead of
  %!expr . Pros for this is statusline is evaluated on current win and
  buf context instead of active win & bufs context.
- Now all components branch & diff(These two are cached) including users
  function components updates on inactive status.
  - now components update status and function components receive an
    argument (is_focused) when called. It indicates whether it's running
    for active or inactive statusline.
- Now lualine no longer aggrasively takes over 'statusline' option.
  instead it sets the global version of statusline option. So it's
  possible to unset it to hide lualine . Or set buffer local version
  of that option to have different statusline then lualine on thay
  buffer
- Switch vim.o to vim.go or vim.opt.
- BugFix autcommands being set everytime an instence of diff or branch
  component is created
- Added new utils functions define_autocmd & is_focused
- Remove utils function lualine_eval
- Removed hacky require cache modification from component.lua
2021-08-08 22:50:17 +06:00
shadmansaleh cb5c4c031e Refactor: async jobs and diff component
- Use neovims job api instead of uv.spawn (Probably a bit less
  performent but should be more stable)
- Fix async jobs leaking pipes
- Fix wrong diff counts .Used to occur because job might not be dead
  after closing it . And that still alive job may send data over stdout
  corrupting the cache.
- lots of variable renames in diff.
- utils/async.lua has been replaced by utils/job.lua
2021-08-08 14:47:20 +06:00
shadmansaleh 66b0736fd4 fix: left section separator not displayed when component begins with a custom highlight 2021-08-05 21:44:22 +06:00
shadmansaleh 65464f7849 fix: component highlights fg defaulting to bg 2021-08-05 21:38:09 +06:00
shadmansaleh 0ad7145127 feat: reload lualine after bacground is set. So themes can adapt 2021-08-04 08:37:35 +06:00
shadmansaleh 46a86a9cca Fix: typo 2021-08-04 08:28:53 +06:00
shadmansaleh 6aecf4a341 feat: Expose current config with lualine.get_config() 2021-08-04 07:13:37 +06:00
alexfertel 7b98680316 fix: Typos 2021-08-03 18:03:26 +06:00
shadmansaleh ea2432cc1e feat: Add source option to diff
It allows you to easily integrate external source for diff count.
If user has some other plugin keeping track of diff counts. There's
no reason for lualine to make same calculations again . It can just
reuse them. But lualine knows nothing about how other plugin exposes
their api so user will have to glue them together with this option.
2021-08-03 17:41:37 +06:00
shadmansaleh e7b8b42089 Fix: Branch not working on directory with whilespace 2021-08-03 15:28:05 +06:00
shadmansaleh ac9a9e0a8b fix: Possible fix to diff sometimws not apearing 2021-08-03 12:19:12 +06:00
shadmansaleh 62b53c854c feat: Allow extensions to spwcify inactive sections too 2021-08-03 12:08:17 +06:00
shadmansaleh 51daaf6f5a fix: Fixes bug diff somtimes doubled 2021-08-03 09:56:07 +06:00
shadmansaleh 486be4462f Remove new_async():send() pattern + restructure augroup
This does not load load lualine asyncronasly rather fools the profilers
In addition causes issues like intro disapearing
2021-08-02 21:16:17 +06:00
shadmansaleh 7a45a4f7fe feat: Add support for useing color_name like red and cterm values to set colors in lualine 2021-08-02 20:25:34 +06:00
shadmansaleh fd5f635f4f doc: Remove docs for component specific transitional separator
Keep it as experimental feature for now . It requires more testing
2021-08-02 19:40:14 +06:00
shadmansaleh 74d23fbd0c Reload theme when setting it up so auto can pick up changes in coloracheme 2021-08-02 12:48:23 +06:00
shadmansaleh 6d153dac1f |BEAKING_CHNAGE| Fix :lualine disapearing on reload + Allow live updates
Breaking Change: Now subsequent call to lualine.setup modifies old setup
instead of configuring from scratch
2021-08-02 12:40:11 +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
shadmansaleh e544b47895 Load lualine after session load
closes #309
2021-07-27 13:25:10 +06:00
shadmansaleh f7c44efb6f Proritize color option then theme when creating comppnent_hl
closes #299
2021-07-27 13:18:25 +06:00
shadmansaleh 87b060f390 Fix create_component_highlight overwritting older highlight with same hl_tag
This is necessary so color option from inactive and active sections do not conflict
2021-07-27 12:57:51 +06:00
Shadman ab818ec91a
Merge pull request #1 from shadmansaleh/feat/diagnostic/add_option/update_in_insert
feat: Add update_in_insert option to diagnostics component
2021-07-25 13:51:37 +06:00
shadmansaleh f60bec0969 feat: Add update_in_insert option to diagnostics component 2021-07-25 13:48:50 +06:00
shadmansaleh c57cb43c4d feat:Add component evaluation for inactive sections 2021-07-25 12:52:52 +06:00
shadmansaleh 438ab4e468 Feat: Allow transitional separators to be set on component basis 2021-07-25 12:41:07 +06:00
shadmansaleh 1d40e34aef Refactor: filetype icon and add disable_text option 2021-07-25 12:39:20 +06:00
David Ruiz 9726824f1d
docs: fixed typo (#262)
* Typo in docs

* Update README.md
2021-05-27 19:53:27 +02:00
Tim Bedard 2aaf434094
feat: add separate hint diagnostic (#241)
* add separate hint diagnostic

* change to lightbulb icon
2021-05-25 22:13:43 +02:00
shadmansaleh d7f3168a55 Small tweek 2021-05-21 11:30:32 +06:00
shadmansaleh 7fc7175ed6 Add docs 2021-05-21 11:30:14 +06:00
shadmansaleh d8a2a640e0 refactor statusline() function 2021-05-21 11:25:14 +06:00
shadmansaleh f480db58fb Allow transitional separator to be set as component option 2021-05-21 11:25:13 +06:00
shadmansaleh a560209c24 Refractor filetype and add disable_text option 2021-05-21 11:23:09 +06:00
shadmansaleh 46eed19a11 Use %{%eval%} blocks 2021-05-21 11:14:54 +06:00
shadmansaleh ef47235330 Add component evaluation for inactive sections 2021-05-21 11:11:25 +06:00
John Hunter 0411f1c830
feat: horizon theme (#253)
* Added Horizon theme

* Tweaked a colour

* another tweak and updated readme with screenshots.

* Added copyright and luaformatter. Corrected THEMES.md

* fixed lint error
2021-05-21 00:07:27 +02:00
Alejandro Sanchez 2f0f1fc49d
feat: quickfix/locationlist extension(#248) 2021-05-19 22:36:55 +02:00
Hubert Pelczarski 2c2876ae0c
docs: updated screenshot width (#252) 2021-05-19 13:44:38 +02:00