* added extension for lazy.nvim
* add lazy to the list of extensions in README
---------
Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
- Added `M.get_mode_suffix()` in `highlight.lua` to simplify retrieving the mode suffix.
- Fixed graphical bug occurring when `buffers` component color was changed.
- Separators would not change to new color.
- Fixed by adding the mode suffix to the highlight name
in `M.component_format_highlight` if the output of
`highlight.fn()` is a string.
- Added `use_mode_colors` option to `buffers`, `tabs`, and `windows` components.
- If it's set to true, the component's colors will change with the
mode, as most other components do.
- Updated readme.
* feat: add draw_empty option to always draw component event when it's empty
Closes#963
* tests: add test for component draw_empty option
* docs: add docs for component draw_empty option
---------
Co-authored-by: Carl Johnson <carl.darick.johnson@gmail.com>
* Refactor tests to use stubs for nvim-web-devicons
* Simplify getting icon
`get_icon` does not need the 2nd parameter (`ext`) as it will derive it
from the given `name` (1st argument) itself.
* fix component(filetype) proper icon based on filetype
With https://github.com/kyazdani42/nvim-web-devicons/pull/125 a filetype
based lookup was implemented upstream which can be used to get an icon
when a file doesn't have an extension.
fixes#578
* feat: added searchcount component
* feat: added timeout and maxcount to vim.fn.searchcount
* docs: added searchcount to README
* style: sorted list of components
Instead of shortening a path segment to just the dot, it is now always
using 2 characters.
E.g.
```
~/.config/nvim/lua/config/lualine.lua
```
is shortened to
```
~/.c/n/l/c/lualine.lua
```
This includes a rewrite of the shortening logic as it cannot be
expressed easily/readable using patterns. The current approach starts at
the beginning and replaces each segment by a shortened version and
keeping track of the overall length (basic book keeping on how many
characters were saved by the replacement).
* buffers: user friendly LualineBuffersJump version
LualineBuffersJump throws an error when an attempt to jump to a
non-existent buffer index is made. It's expected from users to
trigger this error by accident while attempting to switch buffers.
To deal with this add <bang> support to LualineBuffersJump.
Signed-off-by: Plato Kiorpelidis <kioplato@gmail.com>
* chore: autogen (vimdocs+formating)
Co-authored-by: kioplato <kioplato@users.noreply.github.com>
* feat: allow lualine to ignore focus on specific filetypes.
closes#710
* fix: extensions on ingnored_focus
* perf: reuse api call results & use local variables instead of vim.g
* make location & progress components behave in ingnored filetypes
* fix: crash when last_focused win gets closed
* fix: location & progress related broken tests
Previously even if config error was resolved in following setup call
notification for LualineNotice was displayed and when user opened
LualineNotice it'll be empty leaving users confused.
Now we'll wait for 2s before sending notification for LualineNotice so
if successive calls to setup fixed the config error the notification
will not be shown.
* feat: refresh lualine based on timer.
* fix config test
* fix lag on win change issue
* handle errors in timer callback
* feat: add winbar support
Pull in winbar changes form pr #689 and adapt them
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
* make winbar disapear when winbar evals empty
* only update stl of curwin with globalstatus
* properly clear win local stl and wbr opts
* add version guards for winbar feature
* only add winbar if height > 1
* fix tests?
* refresh lualine on ModeChanged event
* ignore floating windows for refresh
* properply restore options to previous state
* fix stl not updating in cmd mode + some optimizations
* fix tests on <nvim-0.7
* merge status_dispatch & winbar_dispatch + winbar support for extensions
* fix globalstatus option not live updating
* update docs
* feat: allow disabling winbar and statusline separately
* fix tests
* fix: winbar some times oddly throwing errors
about not having space in floating windows.
This implements a temporary workaround the issue(https://github.com/neovim/neovim/issues/19464)
until the bug in neovim gets fixed.
Co-authored-by: Diego Fujii <android.mxdiego9@gmail.com>