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.
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.
* 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
* Enhance Theme
- loaded theme table is nolonger stored in configs and thus not passed
to components. Insted it's cached in highlights.lua
- Reintroducing clear_highlights turns out themes can still change if
setup is called more than once
* Add error messege for invalid theme
It stops lualine from crashing in such incedent
* Apply lua-format
* Small tweeks
* Refactor highlight restoring after ColorScheme
Previously custom highlights/ component highlights had to call
expand_set_theme to make them restored . That's unintuative . Now any
highlight created by lualine.highlight.highlight() will be restored :)
* Renamed component -> var_name | Proper BugFix