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

plugins/base16: minor improvements #983

Merged
merged 6 commits into from
Feb 7, 2024
Merged

plugins/base16: minor improvements #983

merged 6 commits into from
Feb 7, 2024

Conversation

player131007
Copy link
Contributor

@player131007 player131007 commented Jan 27, 2024

Fixes #986

@GaetanLepage
Copy link
Member

Thank you for the contribution.
Most of the changes make sense.
However, what would be the point of having the colorscheme option set to null ?

@player131007
Copy link
Contributor Author

We initialized customColorScheme in extraConfigLuaPre. If colorscheme was not null, it would come after customColorScheme in the config and reset the colorscheme

@GaetanLepage
Copy link
Member

We initialized customColorScheme in extraConfigLuaPre. If colorscheme was not null, it would come after customColorScheme in the config and reset the colorscheme

I am not sure to get what you mean ?

Why do a user would want to leave colorscheme.base16.colorscheme = null ?
I would say that this is an "invalid" configuration, don't you think ?

@player131007
Copy link
Contributor Author

player131007 commented Jan 29, 2024

I am not sure to get what you mean ?

If both colorscheme and customColorScheme is not null, init.lua will look something like this:

-- extraConfigLuaPre goes here
require('base16-colorscheme').setup(customColorScheme)


-- extraConfigVim goes here (which includes colorscheme)
vim.cmd [[
  colorscheme base16-colorscheme
]]

Why do a user would want to leave colorscheme.base16.colorscheme = null ?

If they want to set a custom theme, they can leave colorscheme = null and set customColorScheme instead.

Copy link
Member

@traxys traxys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit of a footgun as is, as two options interact in strange ways.

I'd suggest adding a warning if customColorScheme != null and colorscheme != null, and an error if colorscheme == null and customColorScheme == null (see other plugins for inspiration)

@traxys
Copy link
Member

traxys commented Feb 7, 2024

I think you need to update some tests

@traxys traxys merged commit ec07263 into nix-community:main Feb 7, 2024
39 checks passed
@player131007 player131007 deleted the main branch February 8, 2024 01:41
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

Successfully merging this pull request may close these issues.

[BUG] lualine doesnt recognize base16.customColorScheme
3 participants