Closed jantari closed 3 years ago
I believe you have to set the option to
let g:nord_disable_background = 0
I'll double check on my laptop though
No, but I figured it out.
I tried editing the if
statement inside theme.lua
, and I noticed that it would not "trigger" even if I edited it to say:
if vim.g.nord_disable_background == false then
so that made me think, the 1
I am setting probably isn't even treated as a boolean, so then I edited it to:
if vim.g.nord_disable_background == 1 then
and THEN it worked and went into that code path! It looks like you need to cast the integer that vim-script configs use to a boolean first or something before you can do a direct comparison like that (not very familiar with lua).
Yup that sounds about right. I just tested it and looks like the vimscript config doesn't work. I'll fix that soon
Hi, thanks a lot for this colorscheme!
Lua doesn't coerce types during comparisons. One simple way of using these on/off switches via vimscript is with v:true
or v:false
. So the example at the bottom of the README doesn't work, but this does:
" Example config in Vim-Script
let g:nord_contrast = v:true
let g:nord_borders = v:false
let g:nord_disable_background = v:false
" Load the colorsheme
colorscheme nord
Fixed, thank you!
Using neovim:
it appears that I'm doing something wrong or the value I set for
nord_disable_background
does not reach the relevant code intheme.lua
.I use a vim-script config and tried setting before and after loading the plugin, but no effect:
However, when I comment out the
if vim.g.nord_disable_background == true then
statement intheme.lua
so that it unconditionally always sets the editor.Normal color to nord.none, then it works.