vim: initialize colorizer only if termguicolors is set
This additional check is needed because when nvim is started as `nvim -u NORC`, my configuration that sets `termguicolors` is not called but colorizer IS installed and requires `termguicolors` to be set. If it is not set, the setup() function prints an error.
This commit is contained in:
parent
b824717c68
commit
3e61fb902a
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
local ok, colorizer = pcall(require, 'colorizer')
|
||||
if ok and colorizer then
|
||||
if ok and colorizer and vim.opt.termguicolors:get() then
|
||||
colorizer.setup({'*'}, { mode = 'foreground' })
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue