- includes modified class implementation from https://github.com/rxi/classic/blob/master/classic.lua
- now base component class is created from classic.
- change to how component classes are created.
- Don't overwrite new method to initialize a component.
Overwrite the init method. new is responsible for
creating class object and calling init on it.
Unlike previous new overwrite you don't need to create
the class (table) and return it. Instead you will recive
the object as self and do required manipulation on that
just like any most other oop langs. Also don't need to
return anything from init. init's job is to initialize.
remember to call classes init before running your operations
unfortunately lua isn't full fledged oop lang and I don't
how to automate this.
- changes how super classes are accesed.
- rename Component._parent -> Component.super
- methods on super classes now ran through super class instead
of objects _parent self._parent as that can lead to recursive inf loop.
See branch, diff, tabs, buffer classes call to init for example
on pattern.
- All components updated to reflect current logic
- component loader updated to use new initialization procedure.
- updated tests
- updated BREAKING_CHANGES.md
- plus quite a bit of formatting changes in the components
- comp.method = function(self, ...) -> function M:method(...)
BREAKING_CHANGE
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.
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