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

LunarVim's color scheme doesn't highlight differences within a line in diff mode #4240

Open
creiterer opened this issue Jun 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@creiterer
Copy link

Problem description

Using LunarVim's default color scheme lunar in diff mode (e.g., lvim -d file1.c file2.c) doesn't highlight differences within a line.
Diff with color scheme lunar:
lunar_colorscheme

Diff with color scheme default:
default_colorscheme

As the screenshots show, the different strings in the printf are not highlighted with color scheme lunar.

LunarVim version

release-1.3/neovim-0.9-f74046d1

Neovim version (>= 0.9.0)

NVIM v0.9.1

Terminal name

Windows Terminal, Version: 1.16.10262.0

Operating system/version

Ubuntu 22.04.2 LTS on WSL2

Steps to reproduce

No response

Screenshots

No response

@creiterer creiterer added the bug Something isn't working label Jun 14, 2023
@creiterer
Copy link
Author

A workaround is to manually configure the colors used for diffs as described here.
Currently, I have the following in my config.lua:

lvim.autocommands = {
    {
	{ "ColorScheme" },
	{
	    pattern = "*",
	    callback = function()
	        vim.api.nvim_set_hl(0, "DiffAdd", { bg = "#1c444a", underline = false, bold = false })
	        vim.api.nvim_set_hl(0, "DiffDelete", { bg = "#801919", underline = false, bold = false })
	        vim.api.nvim_set_hl(0, "DiffChange", { bg = "#1d2739", underline = false, bold = false })
	        vim.api.nvim_set_hl(0, "DiffText", { bg = "#3c4e77", underline = false, bold = false })
	    end,
	},
    },
}

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
Status: Todo
Development

No branches or pull requests

2 participants