LazyVim.LazyVim/lua/lazyvim/plugins
Nate McCurdy 64b0f0b71d
fix(navic): use the same background color as lualine section_c (#4231)
## Description

Prior to this, when using the navic Extra, the symbol breadcrumbs shown
in lualine section_c had a background color different from the
background of lualine_c, causing it to standout and not blend in with
some colorschemes.

There were ways around this problem, but hose involved overriding a lot
of highlights. See https://github.com/LazyVim/LazyVim/issues/328

This change uses the new (as of April 2023) lualine component built in
to SmiteshP/nvim-navic, which has a `color_correction` option to fix the
problem described above. This built-in component replaces the manual
method of calling `require("nvim-navic").is_available()` and
`require("nvim-navic").get_location()`.

*
711e9f117a
*
bf587250f8

With `color_correction` set to "static" or "dynamic", navic uses the
lualine section's background color when building the breadcrumbs text.

*
bf587250f8/doc/navic.txt (L83-L88)

I chose to set color_correction to "dynamic" to provide the best user
experience as that will update the background any time the lualine
section's background changes (e.g. when switching modes).

## Related Issue(s)

* Fixes #328

## Screenshots

Before this fix, the breadcrumb's background did not match lualine
section_c's:

![before](https://github.com/user-attachments/assets/b30e9844-5aac-4ec8-96fd-a5243de8cded)

After this fix, the breadcrumb's background does match:

![after](https://github.com/user-attachments/assets/63945c48-2edc-4aea-8144-ae0bff1ed952)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 14:08:43 +01:00
..
compat fix(extras): better reasons as to why some extras are included in your config. 2024-06-14 11:14:00 +02:00
extras fix(navic): use the same background color as lualine section_c (#4231) 2024-11-08 14:08:43 +01:00
lsp feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
coding.lua fix(snippet): don't set navigation mappings in nightly (#4375) 2024-11-08 13:40:25 +01:00
colorscheme.lua fix(catppuccin): fix bufferline integration when no colorscheme is set. Closes #4641 2024-10-24 07:58:14 +02:00
editor.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
formatting.lua fix(conform): changes for new conform.nvim config 2024-07-20 17:14:07 +02:00
init.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
linting.lua fix(lint): make prepend_args opt work when default args is empty (#3828) 2024-06-27 17:31:11 +02:00
treesitter.lua feat(keymaps): dynamic which-key icons/descriptions for toggles (#4050) 2024-07-15 15:47:44 +02:00
ui.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
util.lua feat(persistence): added leader-qS to select a session 2024-08-31 09:27:14 +02:00
xtras.lua feat(extras): blink (#4680) 2024-11-02 09:54:55 +01:00