- `searchcount.lua` now checks if the resulting table from
`vim.fn.searchcount` is empty to avoid the error.
Signed-off-by: Chris1320 <chris1320is@protonmail.com>
* added colours to qf extension to distinguish quickfix and location list
* renamed M.init() more properly
* decoupling colours assignments from init method
* 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.