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

Line Numbers background broken #104

Closed
ElcomJ opened this issue Mar 4, 2023 · 9 comments
Closed

Line Numbers background broken #104

ElcomJ opened this issue Mar 4, 2023 · 9 comments

Comments

@ElcomJ
Copy link

ElcomJ commented Mar 4, 2023

After the last commit, my CursorLineNr background configuration don't work, before it was transparent, now it's ignored as shown in the image below:

Settings to set transparent:

Screenshot from 2023-03-04 16-32-13

Before the last commit:

Screenshot from 2023-03-04 16-34-24

After the last commit:

Screenshot from 2023-03-04 16-32-26

@rebelot
Copy link
Owner

rebelot commented Mar 4, 2023

To remove gutter background, use

require'kanagawa'.setup{
  colors = {
    theme = { all = { ui = { bg_gutter = 'none' }  }}
  }
}

@ElcomJ
Copy link
Author

ElcomJ commented Mar 4, 2023

@rebelot I tried your answer and the error continues, it keeps ignoring my configuration.

Ps: I already updated the plugin to the new commit.

@ElcomJ
Copy link
Author

ElcomJ commented Mar 4, 2023

No need to worry anymore, I've gone back to nightfox.

Thanks for your attention and congratulations for the great work, have a great day :)

@ElcomJ ElcomJ closed this as completed Mar 4, 2023
@rebelot
Copy link
Owner

rebelot commented Mar 4, 2023

No need to worry anymore, I've gone back to nightfox.

Thanks for your attention and congratulations for the great work, have a great day :)

I am sorry you could not find a satisfying solution. You should make sure your custom highlights are source after a colorscheme is loaded. Best practices would advise to wrap your overrides into a ColorScheme autocmd.

Also remember that for any changes to take place, whenever you edit your config, you should run KanagawaCompile command. This is probably why you couldn't see the changes.

@kohane27
Copy link

kohane27 commented Mar 6, 2023

Before:

2023-03-07-05-31-00

After adding the line as suggested above:

2023-03-07-05-31-11

I think bg_gutter's default value was changed, hence the visual change?

I think there are breaking changes recently? I used to have the variablebuiltinStyle field but now it's gone.

I understand that you're maintaining it on your free time and for free. I really appreciate this very nice and warm theme and I wouldn't complain in any other way. But, just as a suggestion, is it possible that you could notify existing users that there are breaking changes in the README? Not necessarily maintaining a list of breaking changes (I understand it increases the workload) but a warm reminder would be nice.

Thank you @rebelot again for creating and maintaining kanagawa. This is the best theme for me and daily driving it has made my life better.

@rebelot
Copy link
Owner

rebelot commented Mar 6, 2023

@kohane27 #79

@maconsuckow
Copy link

I can't seem to get these fixes to work. I have the below config. And none of the options I have commented out have any affect. After any of the changes, I quit nvim, reopen and run :KanagawaCompile. I don't see any immediate effects, so I quit nvim and reopen and I still don't see any changes.

Have anyone else gotten this to work?

return {
	"rebelot/kanagawa.nvim",
	enabled = true,
	compile = true,
	lazy = false,
	build = "KanagawaCompile",
	opts = {
		transparent = true,
		commentStyle = { italic = true },
		theme = "dragon",
		-- colors = {
		-- 	all = {
		-- 		ui = {
		-- 			bg_gutter = "none",
		-- 		},
		-- 	},
		-- },
		overrides = function(colors)
			local theme = colors.theme

			-- colors = {
			-- 	all = {
			-- 		ui = {
			-- 			bg_gutter = "none",
			-- 		},
			-- 	},
			-- }

			return {
				NormalFloat = { bg = "none" },
				FloatBorder = { bg = "none" },
				FloatTitle = { bg = "none" },
				CursorLineNr = { fg = "none" },

				-- Save an hlgroup with dark background and dimmed foreground
				-- so that you can use it where your still want darker windows.
				-- E.g.: autocmd TermOpen * setlocal winhighlight=Normal:NormalDark
				NormalDark = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },

				-- Popular plugins that open floats will link to NormalFloat by default;
				-- set their background accordingly if you wish to keep them dark and borderless
				LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
				MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },

				Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 },
				PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
				PmenuSbar = { bg = theme.ui.bg_m1 },
				PmenuThumb = { bg = theme.ui.bg_p2 },
			}
		end,
		-- config = function()
		-- 	require("kanagawa").setup({
		-- 		colors = {
		-- 			all = {
		-- 				ui = {
		-- 					bg_gutter = "none",
		-- 				},
		-- 			},
		-- 		},
		-- 	})
		-- end,
	},
}

@rebelot
Copy link
Owner

rebelot commented Dec 6, 2024

@maconsuckow you're missing the theme field:

require("kanagawa").setup({
  colors = { theme = { all = { ui = { bg_gutter = "none" } } } }
)

@maconsuckow
Copy link

@rebelot Whoops, thanks for the response!

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

4 participants