mswift42 / themecreator

https://mswift42.github.io/themecreator/ create themes for intellij, textmate, textadept, atom, emacs, vim and gnome terminal.
GNU General Public License v3.0
404 stars 33 forks source link

Terminal mode colors using neovim #12

Closed ChausseBenjamin closed 4 years ago

ChausseBenjamin commented 4 years ago

So neovim doesn't use the colorscheme colors while in terminal mode. There is a fix which I have seen being used by the nova-vim colorscheme where they assing neovim terminal colors.

I managed to make the fix work with the current scheme in a way I think is acceptable:

" Neovim Terminal Mode
let g:terminal_color_0 = s:bg
let g:terminal_color_1 = s:warning
let g:terminal_color_2 = s:keyword
let g:terminal_color_3 = s:bg4
let g:terminal_color_4 = s:func
let g:terminal_color_5 = s:builtin
let g:terminal_color_6 = s:fg3
let g:terminal_color_7 = s:str
let g:terminal_color_8 = s:bg2
let g:terminal_color_9 = s:warning2
let g:terminal_color_10 = s:fg2
let g:terminal_color_11 = s:var
let g:terminal_color_12 = s:type
let g:terminal_color_13 = s:const
let g:terminal_color_14 = s:fg4
let g:terminal_color_15 = s:comment

Would you rather have me make a pull request for the current vim template or would you rather make a separate neovim.txt template to fix this?

mswift42 commented 4 years ago

I'd vastly prefer a pr for the current vim template. I'd rather not maintain 2 templates that are nearly identical.

ChausseBenjamin commented 4 years ago

Cool that's what I thought

mswift42 commented 4 years ago

fixed with #13.

joshpetit commented 3 years ago

Hey! So I see that there was a fix for this but don't see any changes when I try using the color scheme I created from the site (I'm using neovim in my terminal nightly v0.5.0). Here's the file I downloaded off the site and I try and set it inside my init.vim like this:

colorscheme purple

I have fzf so also try setting it using the :Colors command, and it seems to only change the color of my devicons in NERDTree to white.

I tried using set termguicolors but that just takes away all coloring.

Any idea why this may not be working for me? Thanks!

mswift42 commented 3 years ago

If I use neovim with your purple theme this is what I get: purple

Could you try if your theme works with regular vim (version >= 8.0) ?

joshpetit commented 3 years ago

Strange, I tried it with nightly neovim on my arch install and with stable neovim + 8.2 vim on ubuntu and none of them seem to work, maybe I have a conflict in my vimrc? I thought that it might be the polyglot plugin but disabled that and it had no affect. I can try it out with all plugins disabled and try and see if that fixes anything.

joshpetit commented 3 years ago

Yea after disabling all of my plugins it seemed to still not work. I'm not really sure what may be causing this, I'd imagine it'd have something to do with my vimrc since it won't work on both arch and ubuntu 😅. I can just live with an installed color scheme but if you want to take a look, my vimrc is here

Thanks a lot for making this! I'll try again in the future to see if it works.

joshpetit commented 3 years ago

Hey @mswift42 I think I figured out why it isn't making any change for me. It's not modifying the highlighting groups in the file.

For example, if I do

:hi Type ctermfg=147

it changes those things, but I don't see anything inside the purple.vim that makes this modification (I'm assuming it's supposed to be something with how those color values are loaded or something, I'm not familiar with how the syntax color system is).

I'm going to manually make it for now, but just wanted to let it be said for the record. I got information on this from :help group-name.

EDIT: It seems that you do actually do this, but I'm guessing it's something with the hex codes I'm not sure. EDIT: Turns out it's because urxvt just didn't work with termguicolors lol. I switched to alacritty today and termguicolors work. There's probably a way to configure it but I'm switching to alacritty so won't bother.

Thanks a lot for this again!