LazyVim.LazyVim/lua/lazyvim/plugins/extras
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
..
coding fix(blink): remove draw="reversed" for now till new release 2024-11-07 22:52:38 +01:00
dap fix(dap): use dap's splitstr when running with args. Closes #4387 2024-11-08 13:31:19 +01:00
editor fix(navic): use the same background color as lualine section_c (#4231) 2024-11-08 14:08:43 +01:00
formatting fix(prettier): keep existing formatters_by_ft (#4719) 2024-11-07 16:11:36 +01:00
lang fix(lang/ruby): do not enable Rubocop as LSP if Solargraph is used (#4566) 2024-11-08 13:56:44 +01:00
linting feat(eslint): add option to disable eslint auto format (#4225) 2024-11-08 14:05:00 +01:00
lsp feat: moved neoconf.nvim to extras 2024-06-02 09:05:16 +02:00
test fix(neotest): disambiguous key map descriptions (#4374) 2024-11-08 13:37:09 +01:00
ui feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
util fix(project.nvim): correctly delete projects (#4314) 2024-11-08 13:43:11 +01:00
vscode.lua feat(vscode): make use of vscode builtin terminal (#4392) 2024-09-18 08:16:29 +02:00