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

A way to match colors with current color schema #5

Open
carlitux opened this issue May 17, 2017 · 9 comments
Open

A way to match colors with current color schema #5

carlitux opened this issue May 17, 2017 · 9 comments

Comments

@carlitux
Copy link

The tabline is really good and would be good to match colors with current color schema

@bagrat
Copy link
Owner

bagrat commented May 17, 2017

Thanks for raising this. I did not really think about this, but I definitely like the idea.

How would you consider doing this? E.g. link the default Highlight to some built in ones? What exact mapping/matching would you suggest?

@carlitux
Copy link
Author

Really I don't know how to do that, I don't know how vim/nvim store color values.

@tombh
Copy link

tombh commented May 21, 2017

Is let g:terminal_color_0 = "#1b2b34" an nvim thing or for all vims? I see in the OceanicNext theme https://github.com/mhartington/oceanic-next/blob/master/colors/OceanicNext.vim#L170

@bagrat
Copy link
Owner

bagrat commented May 21, 2017

@tombh this looks like NeoVim specific. What are your trying to achieve?

@tombh
Copy link

tombh commented May 21, 2017

Oh, well it was maybe an answer for here - if you can expect a set of available terminal_color_* vars then maybe you could prefill vim-workspace colours with them?

@tombh
Copy link

tombh commented May 21, 2017

Oh! But just realised, they're set by OceanicNext itself, so it's nothing to do with the version of vim. So maybe these vars are something you can generally expect to see from themes?

@bagrat
Copy link
Owner

bagrat commented May 23, 2017

As far as I understood, these variables are optionally expected by NeoVim. Still I am not sure how this scan be done, as in the end, VimWorkspace would define the UI with fixed colors that would change based on the selected colorscheme. However, I don't fully imagine how that would work out, as anyway that's a matter of taste. @tombh if you have any ideas and could experiment with, please feel free to submit a PR and let's continue the discussion.

@tombh
Copy link

tombh commented May 23, 2017

Yeah I've been pondering it too and you're right, those values are not canonical enough. So I think something of an MVP would be a config setting defaulting to off, but when on would make an attempt at matching the user's colorscheme.

Another thing that might be nice is just a copy and paste snippet in the README. I had to remind myself of the highlight syntax.

@bagrat
Copy link
Owner

bagrat commented Mar 10, 2019

Hey @tombh! I have gone for a full rewrite of this plugin, as the code became very messy and I was not able to add more to it. Now the code is much more readable and actually more efficient, so contributions will be much easier. The new code is still in the rewrite branch, but I will be merging it into master very soon.

I have tries to link the default highlight groups into the build in ones, but not really sure how I would match it exactly to the current colorscheme. But I have left it as a TODO with some handy helper functions. If you will have time and ideas, please try and play with those and see how it works out.

Also added an example of setting custom highlight groups.

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

No branches or pull requests

3 participants