Important: It's no longer guaranteed that if component/extension
of same name exists in multiple entries in rtp which one will be
loaded. The guarantee is still there for themes . Means other
plugins or users config can overwrite a lualines internal theme
with same file name . I'm droping the guarantee for components
and extensions because there isn't much usecase for it . It's simple
to have a unique name and droping that guarantee allows more
optimizations that speeds up lualine.
Since for left sep at left most location we will not find and prev_hl
We will use 'Normal' for right sep of right most position we will not
find a next_hl we will use 'Normal'.
Since for left sep at left most location we will not find and prev_hl
We will use the next hl after component similarly for right sep of right most position
we will not find a next_hl we will use previous hl before component
It is too expensive to check if ale is installed or not when ale is not
instaled . It is not that expensive when is is installed. So anyone
useing ale can just add ale to sources option in their config.
- behaviour change now statusline won't be separated with %=
if you don't have at lest one of lualine_x/y/z
- fixed some bugs
- simplified the transitional separators quite a bit. I think now
it's understandable . Yay .
- Perf improvements too.
String values for component are way too overloaded . This means lualine
has to make lots of checks to understand how to load a string value
as a component . With type option users can specify exactly what they
want.
Color/theme created with `highlight_group_name` are handled with link.
Because of that we don't have a table on bg/fg instead a name .
Currently component highlights doesn't take this into account.
After colors from those groups will be extracted to provide fall backs
for component highlight.
this is like the themes now . If some component/extension found in
both lualine repo and in some other rtp path then the one outside
the repo will be loaded.
+ Added better error handling for extensions.
- `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
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
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.
- 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.
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
- 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
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.
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.
* refactor: moved loading to new module
* refactor: check_single_separator
* refactor: simplified separator fixing
* refactor: tests/ -> lua/tests/
* refactor: moved to nvim_err_writeln for errors
* feat: moved config parsing to config.lua
* feat: get config directly from config module
* feat: added load_all function
* tests: config parsing tests
* added assert to luacheck globals
Deepcopying default config is not reverted . And now user config is always applied on top of default_config. Functionaly it should be same as before f98e8514
Adding a new option in options table named `disabled_filetypes` .
It's a list of filetypes . If current filetyoe is on the list
statusline will be disabled.