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

Remove hardcoded terminal colors #104

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

kdheepak
Copy link
Contributor

@kdheepak kdheepak commented Apr 9, 2020

With this PR neovim/neovim#10994, it is no longer necessary to hard code terminal colors for base 16 and neovim will handle it correctly. This PR has been merged and will be available in the next release of neovim.

I ran into this issue because I was using the light theme, and the terminal colors hardcoded here appear to correspond to the dark theme. With the one light theme, the terminal colors do not match that of a terminal outside neovim.
For an immediate fix to work with a stable version of neovim, you can hard code values for both light and dark theme separately.

@kdheepak kdheepak force-pushed the kd/fix-terminal-color-background-light branch from 6231773 to 21984f8 Compare June 4, 2020 15:41
@rakr rakr merged commit 8a11166 into rakr:master Dec 14, 2020
@dkarter
Copy link
Contributor

dkarter commented Dec 17, 2020

@kdheepak @rakr This PR broke the colors in my NeoVim terminal and FZF

I am running Neovim v0.4.4 which was released Aug 7, 2020 so probably containing said change and these hardcoded color values are still necessary.

CleanShot 2020-12-16 at 21 06 49@2x

After adding back the hardcoded values that were removed in this PR into my vimrc it looks correct again:

image

Am I missing something or was there some incorrect assumption with this PR?

@kdheepak
Copy link
Contributor Author

Can you try adding :set termguicolors to your vimrc file? Also, what are the colors of fzf outside of neovim in a regular terminal.

I believe this change is required to ensure that when using vim-one as a theme, the colors inside neovim's terminal match the terminal emulator color scheme or theme.

You can always manually set what was removed as part of this PR in your vimrc to force the terminal to use a certain color scheme. Alternatively, I believe you can even use these colors just for the terminal that is launched to run fzf.

@kdheepak kdheepak deleted the kd/fix-terminal-color-background-light branch December 17, 2020 09:33
@kdheepak
Copy link
Contributor Author

kdheepak commented Dec 17, 2020

Maybe the correct thing to do is something like this:

if has("nvim-0.5.0") && &termguicolors && nvim_list_uis()[0]['ext_termcolors']
  " Do not set g:terminal_colors
else
  " Do set g:terminal_colors
endif

for backward compatibility purposes.

@kdheepak
Copy link
Contributor Author

@dkarter I see you are using neovim 0.4.x. This change is for neovim 0.5.

@rakr apologies for confusion. Do you have suggestions on how to handle this?

@Shatur
Copy link

Shatur commented Jan 10, 2021

I am running Neovim v0.4.4 which was released Aug 7, 2020 so probably containing said change and these hardcoded color values are still necessary.

I have latest neovim 0.5 with the same issue.

Shatur added a commit to Shatur/neovim-config that referenced this pull request Jan 10, 2021
Issue with colors caused by rakr/vim-one#104
@lygamac
Copy link

lygamac commented Mar 24, 2021

@kdheepak are you using a terminal with one-light theme? As far as I understood, neovim/neovim#10994 allows neovim's terminal to use the color of the terminal you are using, not neovim's colorscheme.

I am using light theme too, no problem on my Arch with properly configured terminal. But I have to use neovim-qt in Windows which uses a light-yellow instead, I can see nothing with it :)

laggardkernel pushed a commit to laggardkernel/vim-one that referenced this pull request Mar 26, 2021
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

Successfully merging this pull request may close these issues.

5 participants