Closed Saul-Mirone closed 6 years ago
some hightlight break too, look at the arrows.
visual mod breaks too
JSX is the worest.....
This is happening to me too, but with the terminal app. Background is dark grey instead of the default Dracula background.
Fixes for @Saul-Mirone: Your terminal does not support italics. Or, if it does, your terminfo is not correct (which is why the italics are appearing inverted).
Try disabling the italics with let g:dracula_italic = 0
in your vimrc
Fixes for @braddielman: Add set termguicolors
to your vimrc.
@Saul-Mirone -- Re: Background image. To get that back you'll need to add a reset to the Normal
highlight group.
so, for example: highlight Normal cterm=NONE term=NONE
~I'm not going to revert back to that because you and potentially a few others out there are in the minority when it comes to wanting a transparent background.~
Edit: I may revert to a system that falls back to transparent based on t_Co
and/or termguicolors
-- Either a direct fallback or add an option flag. Let me think about the best way to approach this.
@braddielman: Terminal App might not suffice for the fix that I suggested above as I'm not sure that that terminal supports truecolor.
If that's the case, you're seeing the gray because that's the closest 256 color fallback. See #60
@dsifford - Yeah, using set termguicolors
sets the background to bright yellow. The theme was working prior to the update, however. It's cool though since I mainly use MacVim.
I'm on iTerm2 and my background color has also changed to match the airline gray. It was working until I did a vim-plug PlugUpdate a few minutes ago...
set termguicolors
seems to fix the issue outside of tmux, but when in tmux it looks like it completely breaks syntax highlighting
@rivyx Haha, yeah I'm a tmux'er myself and there's a few things that you need to do to make it play nicely...
Can you confirm that you have the truecolor overrides in your tmux.conf and the correct terminfo file is being read by tmux?
@dsifford the terminfo is the same for both my iTerm2 and my tmux (xterm-256color) and in an effort to keep my dotfiles portable I'd rather not implement truecolor overrides...just from a quick google it looks like a bit more overhead than I'm comfortable with
Actaully, it doesn't look too bad. I will try this out after work and report back later. Until then, is there a solution which does not require truecolor overrides?
Thanks again
Adding truecolor support with iterm should be no more than just adding a single line to your tmux.conf
.
Adding a terminfo fix is only relevant if you want to make italics work correctly.
For example, here's the line from my tmux.conf.
The relevant portion of that line with respect to truecolor is the ,*:Tc
.
Then I tried add italics for my terminal by followying [this].(https://apple.stackexchange.com/questions/266333/how-to-show-italic-in-vim-in-iterm2) I succeed but nothing seems changed.
For Dracula, What important to me is that it can be used together with it's iterm and zsh themes. So I can do every thing in terminal. (I use solarized in gui vim). Thanks for the guys who contribute to this awesome theme, but these day's update seems break the most important advantage for some guys like me, so I have to use an old version managed by myself. I write this because I think it maybe useful for you guys to maintain this project.
I'm having @Saul-Mirone's issue too. Some keywords have cyan highlighting. And when I source my .vimrc from within vim, I get this output:
I'm using Vim8 in iTerm2 3.1.5 (also with dracula theme), using the following settings in this exact order fixed both issues for me:
let g:dracula_italic = 0
colorscheme dracula
highlight Normal ctermbg=None
@larshisken Bingo!
Thanks for centralizing everything for people who are reading this thread.
Again, I'll likely add in a flag to disable the ctermbg
in the Normal
group when I get some free time.
@Saul-Mirone You're more than welcome to maintain a fork, but again the entirety of your issue boils down to having ctermbg set. So you're sort of creating more work for yourself.
If you can hold off for now, just add in the fix that @larshisken has above and I'll add in that flag soon.
@dsifford So I got it working fine on my local instance of tmux inside of iTerm2 now that truecolors has been enabled and I've changed my terminfo to support italics and truecolors. However, I am now getting a seemingly related issue on Konsole (Kubuntu 16.04) inside of tmux (with terminfo and truecolors properly set).
Also, I like using this theme on remote servers and I definitely don't always have the option of setting up truecolor overrides on there.
Honestly, this update has really made working with this package a lot more difficult. I don't know what was wrong with the previous background color configuration, but until this issue is fixed/truecolors are optional, I am going to fork the project from a previous version...
What's the unrelated issue you're getting?
Also, re: remote servers -- I adopted the same fallback mechanism for that that gruvbox uses: https://github.com/dracula/vim/blob/master/colors/dracula.vim#L28
If in the case that the remote server passes the fallback, setting the flag to disable ctermbg should make the theme work fine on remote servers.
Side note: I'm receiving a lot of flack here because of the update. I'll say this again: Nobody is stopping you from forking this and maintaining your own implementation that satisfies whatever look you're going for. The update was done for two reasons:
I can't make everybody happy, so as a second best, I'm forced to make changes based on what a majority of users would agree upon.
Thanks for understanding.
Now getting the same issue inside of tmux on local Konsole (Kubuntu 16.04) and while inside of tmux on a remote server. This screenshot is from vim running in tmux on a remote server inside of iTerm2. It is the same problem from my previous comment (that screenshot was from my Kubuntu machine). It looks like the background color is being set correctly everywhere except the text characters (they have a gray highlight).
For Konsole, this problem persists even with truecolors set. For the remote server, I have ctermbg disabled and am getting the same problem.
EDIT: I reverted a lot of settings that I've been messing with and it looks like termguicolors was the problem there. Everything seems to be working now. Thanks for the help.
@rivyx The issue you're describing above is likely related to the ostensible fact that you have termguicolors
indiscriminately enabled.
To get it to play well for all situations, you need to add a check in your vimrc that checks the environment you're in and then enables termguicolors
based on that. If termguicolors
is not enabled, then you should also (for now, until I get a chance to add the flag), add in a downgrade of the Normal
highlight group so that ctermbg=NONE
Hope that makes sense.
@dsifford Yes, it looks like I realized that just as you were commenting. Also, sorry if I sound ungrateful, I do appreciate the work you've been putting in as well as all the help you've been providing for everyone. It was just very frustrating for a little while which I'm sure you get.
That being said, if it is possible to somehow tell dracula to set these settings automatically based on the current environment, that would be great! Thanks again...I luckily did not have to fork haha.
EDIT: Updating the instructions at https://draculatheme.com/vim/ would also be helpful for future users :).
@dsifford I tried @larshisken 's solution but it didn't work for me.
Sorry for the delayed response.
@rivyx Re: "if it is possible to somehow tell dracula to set these settings automatically based on the current environment" --- I agree that would be ideal, but there's just too many variables in play to be able to do that effectively (terminal, os, kernel version, unpredictable terminfo across similar machines, etc). No way that I'm aware of to be able to reliably catch all of that.
Re: "Updating the instructions at https://draculatheme.com/vim/" -- @benknoble did a pretty amazing job with the help docs which are now available with :h dracula
-- I think that might be something that we could potentially put in there. PRs accepted.
Glad to hear you were able to get everything sorted without having to fork!
@Saul-Mirone Refresh me again on what issues you have that are still unresolved? The same as your original comment or just a portion of that?
Can you link me to your vimrc? Also, can you provide some info related to your environment that you're on (terminal, os, vim/neovim/gvim, etc).. I understand you're using tmux. Have you tried terminal-override fixes?
Hi all, sorry for leaping into the thread really late, just want to add a couple of things I saw.
g:dracula_italic=0
before setting the colorscheme!screen-256color
in tmux and xterm-256color
elsewhere; vim takes care of the rest automagically.termguicolors
, and I experience no issues.P.S. @dsifford , I haven't gone through the Terminal theme yet to see if it needs to be updated re: the spec.
When the new ctermbg
flag gets added, let me know if you need help editing the doc file. It sounds like it could use an a explanation of what to with termguicolors
, but I'm not in a position to author that sort of explanation.
I have same issue as above ^ @Saul-Mirone
@Saul-Mirone @hacker1db
Try setting let g:dracula_colorterm = 0
to disable background fills.
@dsifford when I use tmux with that flag set it, the colorscheme loads as expected but when you use vim in just a standard terminal the theme does not load properly.
@hacker1db How so? I have no bg issues in/outside of tmux now
@hacker1db Yeah, you'll have to write in a conditional in your vimrc to apply that flag only why tmux is loaded.
so, basically...
if exists('$TMUX')
let g:dracula_colorterm = 0
endif
@benknoble I think in @hacker1db's case, when tmux is not loaded his terminal background is black, where yours likely already has the dracula colors
This first image is before I enter the command colorscheme dracula (without running tmux) this is after I enter the command manually :colorscheme dracula
@hacker1db Can I assume you have the overrides set appropriately and you're calling colorscheme dracula
somewhere in your init scripts after setting those overrides?
Do you have a link to an updated version of your startup scripts?
What terminal are you running?
@dsifford dotfiles-nvim tmux_conf *Note I am using my dev_branch for testing to see if my colorscheme issues are resolved.
@hacker1db Looking at your init.vim
Are these lines correct?
https://github.com/hacker1db/Dotfiles/blob/dev_branch/config/nvim/init.vim#L39 https://github.com/hacker1db/Dotfiles/blob/dev_branch/config/nvim/init.vim#L42
@dsifford Sorry, can you please clarify your question are you thinking there not correct?
Sure..
What I mentioned may or may not be correct based on your intentions, so I'm not sure. One thing I'm noticing is that you're explicitly forcing 256 color on all terminals and you are only setting "termguicolors" when not in tmux. Is that what you intended?
Also, this line is redundant and shouldn't be necessary.
I guess, I was setting "termguicolors" to see if it would fix the Dracula theme when not in tmux.. as it works now when in tmux but when your not in tmux the color scheme does not apply but you manually apply it and all is well.
Sorry for my slowness -- can you clarify again just once more what exactly is broken in non-tmux terminals?
Just want to make sure we're on the same page here.
Updated the plug-in today and the background color changed to the issue folks are having here.
fixed with let g:dracula_colorterm = 0
however the line number gutter no longer has a contrasting color.
@k-f- Hm.. Would you mind posting a screenshot?
(everyone else: Sorry for the noise and the trouble with this update -- hoping we can get this collectively sorted out soon!)
@dsifford the colorscheme does not apply fully when not running tmux
@hacker1db Right, but specifically, where is it not applying?
From your screenshot, it appears that the only issue is with the ~
in the gutter? Is that correct?
Correct, I can't tell for sure if its affecting anything else but thats the most obvious issue. @dsifford you are correct its not fully applying to ~ which intern looks like it doesn't fully apply to comments.
Would you mind reporting back with the output of :verbose hi NonText
in the affected terminal?
Also, can you run :set foldcolumn=3
and let me know if that is affected as well?
@dsifford here is the info you asked for let me know how else I can help is anyone else besides me having this issue? I wonder if its something I did in my config that is causing this issue...
Hi, I'm using vim in iTerm on macOS. My iterm theme is dracula as well. It works well for years. I update dracula today and my iterm color is so werid,and the background image disappear, what happend?
BEFORE I UPDATE
AFTER I UPDATE