Hello !
Following the 0.7 changes, I am trying to translate the following snippet of my configuration to the new lua-only syntax:
function HighlightExtraWhitespace()
vim.api.nvim_set_hl(0, 'ExtraWhitespace', { bg='Red' })
vim.cmd[[ match ExtraWhitespace /\s\+\%#\@<!$/ ]]
end
The first line is the new version of vim.cmd[[ highlight ExtraWhitespace ctermbg=red guibg=red ]]
and seems to be working fine.
However, I am not really sure about what to do with the second line. What is the lua-way to replicate this feature ?
I went through the documentation but did not manage to find the answer.