-
Notifications
You must be signed in to change notification settings - Fork 68
Use vim-colortemplate to generate vim colorscheme #59
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
Conversation
Hmm, I may be doing something wrong, but I got a lot of errors when trying to use the template:
@lifepillar maybe I misunderstood how to use a colortemplate? Here's what I did:
|
oh, and for reference:
|
Oh, wait! Now I see that my vim is version 7.4, and I've been sure that it's 8.x. I guess that explains things... |
At least we will have thorough testing across Vim/Neovim (as I use Neovim on Arch Linux). I am going to fix the other issues @lifepillar mentioned in their comment in a bit #47 (comment) |
I'm reinstalling my system to newest Linux Mint, so I should have Vim 8 at my disposal in a day or two. |
Hi @dngray ! I've rewritten the templates and pushed my commits to your branch. I've checked the results in both terminal and GUI vim, and they seem correct! (No more problems with the background, thanks to @lifepillar's fix for lifepillar/vim-colortemplate#24) Please verify whether it works for you and let me know so that we can merge this :) (of course the styling can be improved, but I think it can be done in a separate PR). |
Hmm, some updates from master got in accidentally, and github is displaying all of them despite the fact that they are already in the target branch... I'll rebase and push-force the branch to make it readable. |
Only define the colors for now. This is assuming standard "meaning" of ANSI colors, as set by selenized configs for terminal emulators.
Match current selenized.vim (as much as possible).
While I've ended up rewriting the templates from scratch (this merge uses "ours" strategy to drop changes from target branch), Daniel's help was invaluable in getting this done, so I wanted to give him credit by including his commits for reference. Also, put vim templates in vim directory. utils/templates is for templating the actual palettes (i.e. color values), not highlighting configuration. Fixes #47. \o/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works nicely for me, and while of course I'd like to improve the styling, I think it can be merged.
Colortemplate requires vim 8 which is not available in my system repositories.
Seems to build fine.
I did notice the background was now grey. Does it look like this for you? It does however seem to work correctly in nvimqt 👍 🎉 The black/white variant looks correct in both nvim and nvim-qt. |
It didn't seem to work in Vim either:
|
@dngray no, it should not look like that. It should look like this: How can I reproduce your environment? Is that neovim? What terminal emulator? |
The first screenshot was neovim, the second one was vim.
Mine looks like this:
I'm using termite with selenized-dark.config.
|
Okay, I've reproduced this with See for yourself how limited the palette is: https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg One color that could potentially be used is 23, |
Okay, so you can either |
256-color palettes don't have enough colors to approximate reasonably selenized background shades. It makes more sense to specify grayscale, as Solarized does.
Selected ones are better than colortemplate's default approximation.
So that worked to fix Vim, and it seems I found a solution for Neovim ie: set Awesome. on the left is the original vim theme post those fixes. On the right is the colortemplate. Only suggestion there would be the background of the popup box is a bit hard to see, otherwise looking good! |
Does it mean that I'm thinking what the default behaviour should be. The recommended way of using selenized is to rely on properly configured terminal palette. However, even with that done many terminals will advertise themselves as 256 color, which will result in vim trying to use inferior 256-color variant. Should we disable them altogether? Or
Sure, will fix this later this evening :-) In the meantime, can you play around with improved 256-color themes and let me know how do youl like them? |
Hmm. https://github.com/lifepillar/vim-colortemplate/blob/master/doc/colortemplate.txt#L241 Also:
|
So I don't think |
Yes I think that looks rather nice. |
Interesting, i get the same issue with vim-solarized8 if I don't set Eg: Left is with |
So I think I might have figured it out. It's this issue: https://github.com/lifepillar/vim-solarized8#but-my-terminal-has-only-256-colors I did ask in neovim:matrix.org
Maybe this provides more insight. |
I also found this might be worth taking a look at lifepillar/vim-solarized8#71 |
I think I'd look at this commit lifepillar/vim-solarized8@de124fa Maybe we could have a And to make sure we set "Neovim = yes" as I noticed in the docs #59 (comment) seems @lifepillar has done that for his solarized8 theme too: https://github.com/lifepillar/vim-solarized8/blob/master/templates/_info.colortemplate#L8 |
Thanks for the research! I'll look at it tomorrow. For now I'm pushing a commit that styles completion menu. |
I did notice a couple of things, the old theme (bottom) had highlighting for incorrect spelling, and for hyperlinks. I'm sure you're gradually working these things back in. I'm personally a fan of underlining incorrect spelling as opposed to highlighting it as the word remains readable. See this example with Solarized8: Generally red underlining is used for grammar, green/blue is used for grammar. |
I've just added styling for links and underlined elements. As for incorrect spelling, I'm not sure why it's not working. I suppose that "Error" is group responsible for styling it, and it is already configured (btw, you can check highlighting group names with
I've tried adding an option just like I'd like to leave it as is for now (with a note about the workaround) and merge this PR, as it's getting quite long. The discussion in issue #47 is also very long and mostly related to how colortemplate works. Therefore I suggest to close it and move unsolved parts to separate issues. Do you agree? |
Sure sounds good. You've done some awesome work here. |
@jan-warchol did you get my email? |
Yes, yes, I'm just a little busy. I'll reply in more detail in the evening.
Thanks! I was motivated by your patience and help, it is very welcome! :-) I'll just push README commit that I wrote in the morning so that you can take a look and merge in the evening. |
You've chosen some great colours, and I'm really terrible at that kind of thing. Looking back at solarized now, the background is too dark, so I guess I am a selnized convert. About the only other theme I've seen recently that has made me not want to vomit was Nord.
Yeah I had a skim through it and didn't see anything wrong. Glad we got colortemplate to work. |
Use vim-colortemplate to generate vim theme files in all 4 variants (dark, light, black, white). Styling is almost the same as in previous version of the theme. It also fixes jan-warchol#33 and closes jan-warchol#62 (makes it obsolete).
I have worked on putting some of the colors from your draft into a colortemplate as your comment here #47 (comment)
I still need to figure out how to set
ctermbg=8
for MatchParen and Visual. Not sure about that.Closes: #47