* 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>
* docs: fix typo in component notice
* refactor: rename typo param 'pattern'
* docs: fix comments typos across project files
Cleanup misspellings and wording in comment lines.
* docs: improve readability of `CONTRIBUTING.md`
* docs: improve readability of `README.md`
- Minor typos
- Clarify information
- Separate sections from paragraphs
* docs: add newline below headers in `THEMES.md`
Aim's to be consistent with other documents.
* docs: fix unname tabpage command reference
* docs: reword 'directly bused' for `setup_theme()`
* docs: fix extra indent in contribution list
* docs: more separation in readme/tabs, remove extra backtick
* docs: further improve wording for `setup_theme`
* docs: improve wording for `setup` function
* docs: missing underscore in lualine/config
* Add option to show buffer number + alternate file icon
* Address PR comments
* Adjust existing tests for buffer bufnr mode additions
* Revert "Adjust existing tests for buffer bufnr mode additions"
This reverts commit f8422d9f38b4b437a2330101e13c3a4bc50ed920.
* Add missing case for buffers mode == 0
* Fix some test cases for alternate file icon + modified icon
* Add test cases for modes 3 & 4
* Correct typo in README
* Fix buffers component mode can change layout specs
* Detect buffer numbers in lualine_spec bufnr tests
* Minor change to test descriptions
* Delete unnamed buffer for consistent test results between nvim versions
* Add test case for alternate buffer when switching buffers
* Extend switching buffers test
Co-authored-by: Marc Jakobi <marc.jakobi@tiko.energy>
Co-authored-by: Marc Jakobi <mrcjk@p40yoga.localdomain>
* feat: add option to invert component icon alignment
Invert component status icon if variable is set `icon_right = true`.
* refactor: use string for icon alignment
Change conditional variable for icon left/right alignment from Boolean
to `icon_alignment = 'right'`.
* refactor: check icon table for alignment variable
Determine component status output from icon_alignment variable.
Provides alignment variables for generic component and filetype
devicons.
`component = { 'name', icon = {'*', align = 'right'} }`
`component = { 'filetype', icon_alignment = 'right' }`
* style: restore previous formatting on line 79
* refactor: set `self.option.icon` as table
* fix: forgot non-color icon alignment
* fix: remove redundant variable assignment
* docs: add README examples for icon alignment
Include configuration examples for icon alignment to README file.
* test: add test for filetype components icon align
Ensure testability for filetype icons being aligned to right side.
* Fix: use escape sequence instead of binary chars
binary data will confuse some programs e.g. file and treat the code as "data" instead of "text"
* Fix: remove redundant binary character "0x1a"
* feat(diagnostics): add padding when using different background colors
When each "sub-section" of the diagnostics components have a different background the rendering is off when
multiple more than one of them is shown.
* chore: fix typo and spelling
* enhance: add statusline test module
* update old tests to use statusline test setup
* show diff in statusline:expect
* Revert "show diff in statusline:expect"
This reverts commit cea25185fde1b99110759f198ef1fc724626306c.
* autoformat
* fix testcov reports
* update statusline test module
* revert lualine_spec
* update lualine_spec using statusline module
* apply formater
* add tabline support to statusline test module
* re enable tabline tests
* fix inconsistency in buffers mode test due to bufnr changing
Should we be showing bufnr/buffer_position in buffers component
* autoformat
* minor tweeks to stl test module
* use nvim_eval_statusline in nvim-0.6+
* fix tabs component on nvim-0.5
* enable disabled branch test
* feat: allow functions in color options.
* update_evilline
* docs: document color functions
* remove unnecesery stuff
* add dynamic color supoort for themes
* chore: autogen (vimdocs+formating)
* fix dynamic colors not working as color fallback
* fix transitional separators not updating for dynamic colors dynamic colors
* fix failing tests
* apply format
* Allow cases where theme doesn't even define nornal color for some mode
* allow color function to return nil
* some enhancements
* more enhancements
* code cleanup
* if we don't have even normal in theme we should just nvim highlight it with it's ususal stl colors
* not sure how it get here . It should be in different pr
* keep only c of lualine_c in component section name
* use sh to run docgen
* fix filetype component not respecting color option properly
* fix section x,y,z not falling back to correct colors
* auto format
* actually fix xyz not falling back to correct mode
* fix comp sep not correctly removed properly on function hl
* pass only section in color fn
* more enhancements
* update docs
* update create_comp_hl call locations
* enhancements+fixes
* fix broken hls in tabline
* Fix function color options not inheriting right colors
* some enhancements
* fix tests
* tweek docs
Co-authored-by: shadmansaleh <shadmansaleh@users.noreply.github.com>
* (feat) add rename
* remove tabname if LualineRenameTab is ran without args
* document LualineRenameTab
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
* fix: lualine crashing because of keyboard interrupt.
If keyboard interrupt occurs while lualine is evaluating statusline
lualine crashes completely. Since keyboard interrupt isn't something
we can handle try to mitigate the issue by retrying to evaluate the
statusline on error.Now lualine will retry 3 times before giving
up on an runtime error.
* Make last retry unprotected call
- Now `nvim_lsp` source shows diagnostics generated by vim.lsp only
avoids uses vim.diagnostic to avoid deprecation warning on nvim 0.6+
Why? `vim.lsp.diagnostic` deprecation warnings are way too aggressive.
And I'm annoyed by people complaining here even though the warning is
generated by some other plugin (After introduction of nvim_diagnostic
source lualine just can't produce that warning it used to switch users
to nvim_diagnostic source with a warning on nvim0.6+).
Forget it just let anyone that wants lsp specific diagnostics have
`nvim_lsp` . I'd still recommend using `nvim_diagnostic` over
`nvim_lsp` as diagnostics generayed by plugins like `null-ls` won't
showup in `nvim_lsp`
- Remove remanents of `nvim` diagnostics source.
* Schedule a redraw of tabline when setting tabline
The tabline isn't drawn until scrolling the window or opening another file. Opening multiple files at once (e.g. nvim a.txt b.txt) will only show the first.
By performing a deferred redraw of the tabline this fixes this startup behaviour problem.
* Changed to use vim.schedule