In vim, I can do:
<code>set colorcolumn=80
hi ColorColumn ctermbg=red guibg=red
</code>
<code>set colorcolumn=80
hi ColorColumn ctermbg=red guibg=red
</code>
set colorcolumn=80
hi ColorColumn ctermbg=red guibg=red
and it works find.
I am trying to achieve the same thing in NeoVim, using lua script.
I have tried various things, but so far no luck. Some of the things I tried:
<code>vim.opt.colorcolumn = '81' -- This line works fine!
vim.cmd([[ highlight ColorColumn ctermbg=red guibg=red ]]) -- but this does not
vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg='Red', bg='Red' }) -- neither this one
</code>
<code>vim.opt.colorcolumn = '81' -- This line works fine!
vim.cmd([[ highlight ColorColumn ctermbg=red guibg=red ]]) -- but this does not
vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg='Red', bg='Red' }) -- neither this one
</code>
vim.opt.colorcolumn = '81' -- This line works fine!
vim.cmd([[ highlight ColorColumn ctermbg=red guibg=red ]]) -- but this does not
vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg='Red', bg='Red' }) -- neither this one
What am I doing wrong ?
NeoVim version : 0.10.0
Platform: Ubuntu
1