Closed IlikePepsi closed 7 years ago
I don't understand why you put all those settings in your configuration. They're just examples of the existing options, and typically you don't need any of them. Remove them and see if the error message changes.
I added them since in the 'vanilla' setup it didn't work. I got the error message "Unsupported color scheme. g:limelight_conceal_ctermfg required".
I'm using this colorscheme. At first of course I tried another colorscheme but even with :colorscheme default
I get the same message. As a test I removed all those configurations except for the required g:limelight_conceal_ctermfg
and again when I call :Limelight0.5
or anything I get "Cannot calculate background color."
I also used that configuration with vim instead of nvim but the result is the same. Which terminal do you normally use?
The color scheme you use does not set foreground and background colors for "Normal" highlight group, so Limelight has no information to calculate the color to use.
As suggested in the error message, you can set g:limelight_conceal_ctermfg
, so Limelight can use the color, but in that case the color is fixed. :Limelight
will work using the color, but :Limelight
with any number argument (e.g. :Limelight0.5
, :Limelight1
, etc) will not work, because Limelight still has no information to calculate the color corresponds to the argument. I guess the error message can be improved. But anyway that's what's happening here.
Two options:
g:limelight_conceal_ctermfg
and use :Limelight
without number argumentI was running into this situation. It was not the colorscheme, but rather another setting in my vimrc
/init.vim
intended to make transparent terminals work:
" Fix to allow transparent background
hi Normal ctermbg=NONE guibg=NONE
The solution was to find ctermfg
and guifg
as set by my colorscheme using the hi
command, then setting the limelight settings (gruvbox for example):
" Color name (:help cterm-colors) or ANSI code
let g:limelight_conceal_ctermfg = 100
" Color name (:help gui-colors) or RGB color
let g:limelight_conceal_guifg = '#83a598'
@junegunn when I have my color scheme using a transparent background color, is there an option to tell Limelight which is my background color instead (the one set by my terminal in this case)? So then it can calculate which fg color to use when activating the plugin with params (0.9, 0.1, etc)?
If I do NOT have the g;Limelight_conceal_ctermfg =
set then I receive the error:
Unsupported color scheme. g:limelight_conceal_ctermfg required.
When I do set it, let g:limelight_conceal_ctermfg = 240
I don't get the error from this post but Limelight works with my 'seoul256' colorscheme:
Cannot calculate background color
@junegunn Is there a way to suppress this error message?
@junegunn Is this project still maintained?
Yes, but I don't always have time and interest to look into problems that don't affect me. This is a free, open-source project, you can contribute to it.
@junegunn I really appreciate what you say.
Unfortunately, my vim script skills are limited as I am not a developer but a hands-on enterprise architect who uses vim a great deal for 'distraction free' and fast productivity. I've used 'iA writer' & Typora for years and wanted to combine my command line experience.
It was all working for the past 3 years until I changed laptops. Perhaps someone with a bit more time may be my night in shining armour :)
I'm really curious to use your plugin but the only message I get when calling
:Limelight1
isCannot calculate background color.
What I've done so far is install your plugin via vim-plug and putting these settings in mynvim.init
file.So I'm using neovim (in case that is important). I even tried different terminal emulators. So far I got urxvt, guake and terminator. All show the same error message. If the Linux flavor is important, that's what I got.
So any hint is appreciated.