nvim-lua-guide
nvim-lua-guide copied to clipboard
WIP: nvim_set_hl
closes #47
With 0.7, you can now set highlights in pure Lua:
vim.api.nvim_set_hl(0, "Search", { fg = '#2E3440', bg = '#E2A478', bold = true })
vim.api.nvim_set_hl(0, "IncSearch", { link = "Search" })
(namespace 0 for the global highlight). Note: this completely replaces the highlight group (so {} clears it); to change a single attribute, you have to vim.api.nvim_get_hl_by_name("Search", true) it, change the desired key, and then hl_set it again.
The list of valid gui attributes are in :h synIDattr() (plus ctermfg, ctermbg, and cterm).