LazyVim.LazyVim/lua/lazyvim/util
Zhou Fang e50b43544f
fix(lualine): dynamically fetch the color used in lualine (#4788)
## Description

The color used in lualine was previously static and did not update
dynamically when a new colorscheme was applied. This resulted in
inconsistencies between the theme and the lualine colors, as the 'local'
color table returned the highlight color defined during initialization.

This pull request resolves the issue by ensuring that the lualine colors
are always in sync with the current colorscheme. It achieves this by
using `LazyVim.ui.fg(HIGHLIGHT)` to dynamically fetch the appropriate
highlight colors, making the lualine colors responsive to colorscheme
changes.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

**Before**


![image](https://github.com/user-attachments/assets/6b78483b-4a64-4ec3-a902-a0d1ed10a992)

**After**


![image](https://github.com/user-attachments/assets/3f73ec26-cbf1-4ff7-873f-6c7b2c13c481)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-14 15:53:27 +01:00
..
cmp.lua feat(ai): better completion/suggestions of AI engines (#4752) 2024-11-11 10:50:57 +01:00
deprecated.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
extras.lua fix(extras): don't load pkgs when parsing specs for LazyExtras 2024-06-29 10:19:01 +02:00
format.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
init.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
inject.lua feat(util): set_upvalue 2024-05-16 21:25:51 +02:00
json.lua feat(ai): move ai related extras from coding to ai (#4751) 2024-11-10 11:27:21 +01:00
lsp.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
lualine.lua fix(lualine): dynamically fetch the color used in lualine (#4788) 2024-11-14 15:53:27 +01:00
mini.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
news.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
pick.lua fix(pick): get rid of "auto" picker and set better defaults for telescope find_files (#4024) 2024-07-14 07:52:00 +02:00
plugin.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
root.lua feat(root): provide vim.g.root_lsp_ignore to ignore LSP servers (#4332) 2024-10-03 15:55:25 +02:00
terminal.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
ui.lua refactor(ui): cleanup fg/color 2024-11-13 21:14:29 +01:00