Commit Graph

394 Commits

Author SHA1 Message Date
shadmansaleh 7bd381c68b fixup: don't apply padding to empty components 2023-03-30 12:13:15 +06:00
shadmansaleh 1af8c67257 chore: autogen (vimdocs+formating) 2023-03-30 05:34:59 +00:00
Myshko Dm 253a656ca5
feat: add selectioncount component (#959) 2023-03-30 11:34:32 +06:00
Myshko Dm 2ee2fd5b2b
feat: add maxcount & timeout options to searchcount (#958) 2023-03-30 11:30:15 +06:00
shadmansaleh 557715ff91 chore: autogen (vimdocs+formating) 2023-03-30 05:25:45 +00:00
Will Hopkins 7f5f2d811d
feat: change active color of `buffers`, `tabs` & `windows` component according to mode (#971)
- 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.
2023-03-30 11:25:14 +06:00
Carl Johnson 9805076155
feat: add draw_empty option to always draw component event when it's empty (#964)
* 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>
2023-03-30 10:42:48 +06:00
shadmansaleh 508b0785bc chore: autogen (vimdocs+formating) 2023-03-30 04:32:45 +00:00
Will Hopkins c680fb4c25
feat: add datetime component (#973) 2023-03-30 10:32:17 +06:00
_rs 0695853055
fix: progress component changes size while scrolling (#986)
Fixes https://github.com/nvim-lualine/lualine.nvim/issues/849
2023-03-30 10:16:42 +06:00
Miroslav Bendík 092f2497f0
Show insert mode in terminal (powerline theme) (#989) 2023-03-30 10:15:36 +06:00
Zhizhen He 6bb1f80a98
fix: typo (#997) 2023-03-30 10:12:37 +06:00
Dalius Dobravolskas 3497c6c6b3
Passing self as second arg to self.options.fmt (#915)
* Add `tabnr` to `fmt` function

* Passing self as second arg to `self.options.fmt`

* README updated.
2022-12-22 19:14:34 +06:00
shadmansaleh afb8bfb786 enhance: explicitly prefer user config dir
when loading components/themes/extensions explicitly prefer users
config dir over plugin dirs instead of relying on sequencing of rtp.
2022-12-22 12:53:38 +06:00
shadmansaleh bfa0d99ba6 fixup: All tab names have prefix "fugitive: " if current buffer is
fugitive status buffer

fixes #901
2022-11-28 20:48:27 +06:00
shadmansaleh b6314ac556 fixup: tabs component doesn't show fugitive status name properly
fixes #900
2022-11-26 10:02:04 +06:00
zappolowski 9d177b668c
fix component(filetype) proper icon based on filetype (#810)
* 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
2022-10-23 20:41:12 +06:00
shadmansaleh abb03129e0 chore: autogen (vimdocs+formating) 2022-10-19 09:07:21 +00:00
BlakeJC94 1a6ab5f2f4
feat: added searchcount component (#869)
* feat: added searchcount component

* feat: added timeout and maxcount to vim.fn.searchcount

* docs: added searchcount to README

* style: sorted list of components
2022-10-19 15:06:45 +06:00
Gennaro Tedesco dcd194f700
added logic to show fzf-lua statusline if present (#863) 2022-10-19 08:19:50 +06:00
Antoine Cotten a52f078026 feat(utils): support extracting fallback color 2022-09-12 00:35:46 +06:00
Antoine Cotten 05f850d25f feat(utils): support extracting 'sp' scope hl color 2022-09-12 00:35:46 +06:00
Andrey Mishakin 2061fcbf3b
fix: display virtual column number in location component (#835) 2022-09-12 00:32:09 +06:00
zappolowski 5d133a1ef2
fix component(filename) add separator between filename and icons (#812)
This makes it behave like the default statusline.

fixes #794
2022-09-10 15:39:38 +06:00
Daniel Enrique a03f31f566
Add overseer extension. (#828)
* Add overseer ext.

* chore: autogen (vimdocs+formating)

Co-authored-by: dcordb <dcordb@users.noreply.github.com>
2022-09-10 15:22:46 +06:00
zappolowski f10101ab04
feat(filename) Always use the first letter for hidden directories (#833)
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).
2022-09-10 15:20:37 +06:00
matthewsia98 2176d85f39
corrected order returned by workspace diagnostic (#831) 2022-09-10 15:14:26 +06:00
shadmansaleh 9076378ac1 chore: autogen (vimdocs+formating) 2022-08-20 15:51:32 +00:00
John Fred Fadrigalan 5d8fbf2943
fix component(filetype) to return default icon instead of nothing (#800) 2022-08-20 21:50:53 +06:00
shadmansaleh c0510ddec8 chore: autogen (vimdocs+formating) 2022-08-09 07:08:23 +00:00
Hongbo Liu 7b4b864af7
[filename] avoid new file status for unnamed (#795) 2022-08-09 13:07:55 +06:00
Plato 03bcf015d1
More user-friendly LualineBuffersJump (#780)
* 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>
2022-08-08 21:52:28 +06:00
Hongbo Liu 679e9e71de
[filename] support detect new file status (#785)
* [filename] support detect new file status

* update readme about new file status

* add definition for new file
2022-08-08 11:59:33 +06:00
shadmansaleh e8294ac56a feat: allow lualine to be temporarily completely disabled
Adds `lualine.hide()`

closes #776
2022-08-03 21:35:31 +06:00
zeertzjq e37d5d325d
feat: add support for mode ntT (#775) 2022-08-02 19:10:33 +06:00
shadmansaleh c880c8cfed chore: autogen (vimdocs+formating) 2022-07-31 17:11:58 +00:00
shadmansaleh bd52d2d77e fix: notice not being shown in lualine if it doesn't end with \n 2022-07-31 23:10:56 +06:00
Shadman 6d11f9f508
feat: allow lualine to ignore focus on specific filetypes. (#767)
* 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
2022-07-29 16:54:31 +06:00
shadmansaleh 788805771c fixup: escape results of vim_var components 2022-07-28 13:30:17 +06:00
shadmansaleh c6d7485114 fixup: allow refresh option to be set individually 2022-07-28 13:14:55 +06:00
shadmansaleh aeeefcef98 fix: don't show notification for empty LualineNotice
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.
2022-07-28 13:07:44 +06:00
shadmansaleh b378660841 chore: autogen (vimdocs+formating) 2022-07-27 18:03:53 +00:00
Yohanes Bandung Bondowoso 0521ada344
feat: add workspace diagnostics source (#618)
* feat: add workspace diagnostics source

* doc: add nvim_workspace_diagnostics to list of sources

Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
2022-07-28 00:02:58 +06:00
shadmansaleh bf7dfb5dab fix: on_click messing up highlights
solution seems to be keeping hl defs out of on_click wrap.
2022-07-22 20:17:02 +06:00
shadmansaleh 669a7d63ca chore: bump stylua version to 14.1 in CI 2022-07-22 19:48:20 +06:00
shadmansaleh d7386bbab3 chore: autogen (vimdocs+formating) 2022-07-22 13:30:37 +00:00
Shadman 53aa3d82d9
feat: refresh lualine based on timer + winbar support. (#736)
* 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>
2022-07-22 19:29:55 +06:00
shadmansaleh 8d956c1825 chore: autogen (vimdocs+formating) 2022-07-20 13:29:21 +00:00
Shadman 0ac721d376
feat: add on_click option to interact with mouse (#742)
* feat: add on_click option to interact with mouse

closes #706
2022-07-20 19:28:49 +06:00
shadmansaleh 655411fb7a chore: autogen (vimdocs+formating) 2022-07-15 11:53:29 +00:00