LazyVim.LazyVim/lua/lazyvim/plugins/extras/editor
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
..
aerial.lua refactor: LazyVim.config 2024-06-16 15:35:38 +02:00
dial.lua fix(dial): follow comment explanation for integers (#4658) 2024-11-07 16:16:41 +01:00
fzf.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
harpoon2.lua fix(harpoon): harpoon2 deprecated message (#2920) 2024-04-22 09:45:59 +02:00
illuminate.lua feat(toggle): add illuminate toggle for which-key (#4708) 2024-11-08 09:00:36 +01:00
inc-rename.lua feat(editor): added extra for inc-rename.nvim (#3432) 2024-06-04 09:51:36 +02:00
leap.lua fix(flit): use which-key preset keymap descriptions (#4000) 2024-07-13 09:51:19 +02:00
mini-diff.lua feat(extras): added extra for mini.diff 2024-03-28 23:41:54 +01:00
mini-files.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
mini-move.lua fix(mini.move): default mini.move setup already maps the correct keys 2024-03-29 00:21:52 +01:00
navic.lua fix(navic): use the same background color as lualine section_c (#4231) 2024-11-08 14:08:43 +01:00
outline.lua fix(outline): use new object for symbols.filter (#4006) 2024-07-12 22:06:34 +02:00
overseer.lua feat: new mappings format for which-key v3. Forgot to push :) 2024-07-12 22:54:35 +02:00
refactoring.lua fix(refactoring): use pick for both Telescope and fzf-lua (#3769) 2024-06-23 07:01:58 +02:00
telescope.lua fix(telescope): buffers to start at final item (#4189) 2024-11-08 14:06:39 +01:00