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

Generated Lightline colorscheme names differ from base16-vim names due to conversion of hyphens to underscores #5

Open
antoineco opened this issue Aug 21, 2021 · 0 comments

Comments

@antoineco
Copy link

antoineco commented Aug 21, 2021

Right now, it is not possible to set g:lightline['colorscheme'] directly to the value of g:colors_name, because the Mustache template substitutes hyphen characters with underscores in the name of generated files:

let g:lightline#colorscheme#base16_{{scheme-slug-underscored}}#palette = lightline#colorscheme#flatten(s:p)

(in the postbuild script as well)

base16-vim does not perform such conversion, which result in different names between the two projects:
https://github.com/fnune/base16-vim/blob/dd770de2790ef42f260a79878f1dee131d2e3d7d/templates/default.mustache#L148

I was wondering whether this was intentional, since this conversion requires another substitution in order to be able to automatically set the Lightline colorsheme to the current Vim colorscheme, which might be avoidable.

Example:

let g:lightline = {
    \ 'colorscheme': substitute(g:colors_name, '-', '_', 'g')
    \ }
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

1 participant