vim-buffet icon indicating copy to clipboard operation
vim-buffet copied to clipboard

A way to match colors with current color schema

Open carlitux opened this issue 7 years ago • 9 comments

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

carlitux avatar May 17 '17 16:05 carlitux

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?

bagrat avatar May 17 '17 17:05 bagrat

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

carlitux avatar May 17 '17 21:05 carlitux

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

tombh avatar May 21 '17 14:05 tombh

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

bagrat avatar May 21 '17 14:05 bagrat

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 avatar May 21 '17 14:05 tombh

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?

tombh avatar May 21 '17 15:05 tombh

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.

bagrat avatar May 23 '17 10:05 bagrat

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.

tombh avatar May 23 '17 10:05 tombh

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.

bagrat avatar Mar 10 '19 00:03 bagrat