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

bug: Rosé Pine Dawn hard to read diffview.nvim history view #118

Closed
briandipalma opened this issue Jan 13, 2023 · 7 comments
Closed

bug: Rosé Pine Dawn hard to read diffview.nvim history view #118

briandipalma opened this issue Jan 13, 2023 · 7 comments
Labels

Comments

@briandipalma
Copy link
Contributor

Using https://github.com/sindrets/diffview.nvim and Rosé Pine Dawn is a bit awkward on the eye. I've tested this in Kitty and another terminal so I think it's the theme:

image

The yellow, the bold cyan and the white text are hard to read. Is there anything that can be done to improve this?

@mvllow
Copy link
Member

mvllow commented Jan 13, 2023

Hmm, unable to reproduce this. Do you have a minimal config to replicate this?

Example repro:

-- DO NOT change the paths and do not 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.nvim
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 = {
  "rose-pine/neovim.nvim",
  config = function()
    -- Add relevant Rosé Pine config below
    require("rose-pine").setup({})
  end,
  "sindrets/diffview.nvim",
  config = true
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("rose-pine")
-- Add anything else here

Here's my setup using Neovim nightly + Kitty and no plugin config:

Diffview
Diffview in Neovim using Rosé Pine Dawn highlights

Diffview file history

Diffview file history in Neovim using Rosé Pine Dawn highlights

@mvllow mvllow added the bug label Jan 13, 2023
@mvllow mvllow changed the title Rosé Pine Dawn hard to read diffview.nvim history view bug: Rosé Pine Dawn hard to read diffview.nvim history view Jan 13, 2023
@briandipalma
Copy link
Contributor Author

briandipalma commented Jan 17, 2023

Yeah looks great with nothing installed:

image

-- DO NOT change the paths and do not 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.nvim
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 = {
  "rose-pine/neovim",
  config = function()
    -- Add relevant Rosé Pine config below
    require("rose-pine").setup({})
  end,
  "sindrets/diffview.nvim",
  config = true,
  'nvim-lua/plenary.nvim',
  'nvim-tree/nvim-web-devicons'
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("rose-pine")
-- Add anything else here

How does it select the Dawn variant? Is it the default?

@briandipalma
Copy link
Contributor Author

OK I found the issue, I had

vim.cmd("set background=light")

in my rose-pine config which seemed to cause the problem.
I added

Variant respects vim.o.background, using dawn when light and dark_variant when dark

to the README which no longer seems to be the case, will I rephrase it or delete it?

@briandipalma
Copy link
Contributor Author

OK, the only issue is the dark variant quickly flashes when I start neovim before changing to the Dawn variant...so I guess the light background setting did do one useful thing. Is there any way I can pass in a configuration setting to enable Dawn from start? I'm guessing at the moment the variant is changed because the theme somehow knows my terminal has a light colour theme selected?

@mvllow
Copy link
Member

mvllow commented Jan 18, 2023

We may implement separate themes for each variant, e.g. :colorscheme rose-pine-dawn; follow our canary branch to track any progress or subscribe to #98.

At the moment, early in your vim config, set vim.opt.background = "light" to hopefully prevent any flicker :)

@mvllow
Copy link
Member

mvllow commented Jan 18, 2023

Also, if you are using lazy.nvim, try adding a few options to make Rosé Pine a higher priority:

{
"rose-pine/neovim",
name = "rose-pine",
-- Disable lazy loading
lazy = false,
-- Increase priority
priority = 1000,
config = function()
	require("rose-pine").setup()
	vim.cmd.colorscheme("rose-pine")
end,
},

I will add this to the readme as well.

@briandipalma
Copy link
Contributor Author

I've subscribed to #98.

At the moment, early in your vim config, set vim.opt.background = "light"

That causes this issue, even when added early in my config. I can live with a flicker.
Without that config though the gitcommit message panel is dark though.

image

Which is really quite odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants