Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmiteshP/nvim-navic ugly background #41

Closed
azzamsa opened this issue Oct 12, 2024 · 3 comments
Closed

SmiteshP/nvim-navic ugly background #41

azzamsa opened this issue Oct 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@azzamsa
Copy link
Contributor

azzamsa commented Oct 12, 2024

Description

Hi,

I get this ugly background in SmiteshP/nvim-navic.

  • Modus

image

  • Tokyonight

image

Neovim version

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713484068

Terminal and multiplexer

neovide 0.13.3

Modus themes version

a702bfb

Steps to reproduce

    {
        "LunarVim/breadcrumbs.nvim",
        config = function()
            require("breadcrumbs").setup()
        end,
        dependencies = {
            "SmiteshP/nvim-navic",
            config = function()
                require("nvim-navic").setup({
                    icons = Icons.kind,
                    highlight = true,
                    lsp = {
                        auto_attach = true,
                    },
                    click = true,
                    separator = " " .. Icons.ui.ChevronRight .. " ",
                    depth_limit = 0,
                    depth_limit_indicator = "..",
                })
            end,
        },
    },

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "miikanissi/modus-themes.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("modus")
-- add anything else here
@azzamsa azzamsa added the bug Something isn't working label Oct 12, 2024
@miikanissi
Copy link
Owner

Hi,

I looked into this and the reason this happens is due to the WinBarNC highlight group being different from the WinBar highlight group and Navic doesn't support an active vs inactive background value.

There is an issue raised for Navic here about this: SmiteshP/nvim-navic#146

There isn't a way to fix this via the theme except to make both WinBar and WinBarNC use the same background color. At the moment I don't plan on changing this as I think the inactive and active winbars should have a different background.

In order to "fix" this for yourself you can set the background color of WinBarNC as follows:

	{
		"miikanissi/modus-themes.nvim",
		priority = 1000,
		config = function()
			require("modus-themes").setup({
				on_highlights = function(highlights, colors)
					highlights.WinBarNC = { bg = colors.bg_tab_current }
				end,
			})

			vim.cmd.colorscheme("modus")
		end,
	},

@azzamsa
Copy link
Contributor Author

azzamsa commented Oct 14, 2024

Thank you so much for taking the time to look into this issue. This theme is one of the reasons I felt comfortable switching from Emacs. Thanks again! 🥞

@miikanissi
Copy link
Owner

Thank you so much for taking the time to look into this issue. This theme is one of the reasons I felt comfortable switching from Emacs. Thanks again! 🥞

You're welcome. I'm glad you are enjoying it and thank you for all of your contributions again as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants