Mitigation for #967
This happens primarily because of
https://github.com/neovim/neovim/issues/22263
To prevent this from affecting lualine. Mode changed event
for op-pending mode no longer gets scheduled.
As a side effect lualine no longer properly refreshes upon switching
to op-pending mode.
* 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>
This reverts commit 6fbc35b3e0.
The statusline flashing issue in #747 doesn't seem to occur any more as we
aren't updating in autocmd context . But we still have statusline
not updating in cmdline mode. So lets try reintroducing the redraw
commands.