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

Improve diff support #39

Closed
bockel opened this issue Jan 24, 2022 · 1 comment
Closed

Improve diff support #39

bockel opened this issue Jan 24, 2022 · 1 comment

Comments

@bockel
Copy link

bockel commented Jan 24, 2022

When using the kanagawa theme with fugitive, the diffs are not properly highlighted per themer diff settings.
While themer does set DiffAdd, DiffChange, DiffDelete, these do not appear to be linked to override the syntax/diff.vim defaults of diffAdded, diffRemoved, diffChanged as included from other plugins such as vim-fugitive.

I've addressed it in my local config with the following, but it should probably be merged into mapper.lua as it appears to apply to all themes:

		use({
			"themercorp/themer.lua",
			config = function()
				require("themer").setup({
					colorscheme = "kanagawa",
					remaps = {
						highlights = {
							globals = {
								base = {
									DiffAdd = {
										fg = "NONE",
									},
									DiffChange = {
										fg = "NONE",
									},
									DiffDelete = {
										fg = "NONE",
									},
									diffAdded = {
										link = "DiffAdd",
									},
									diffRemoved = {
										link = "DiffDelete",
									},
									diffChanged = {
										link = "DiffChange",
									},
								},
							},
						},
					},
				})
			end,
		})

Since syntax/diff.vim sets the fg color and themer sets the bg, I needed to disable the original fg highlights to get a more pleasing highlight.

@bryant-the-coder
Copy link
Contributor

If i am not mistaken, fugitive is not yet supported. :p Use gitsigns :DD

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

No branches or pull requests

2 participants