--- Sets given highlight in the global namespace --- @param name Highlight group name, e.g. "ErrorMsg" --- @param val Highlight definition map, accepts the following keys: --- • fg: color name or "#RRGGBB", see note. --- • bg: color name or "#RRGGBB", see note. --- • sp: color name or "#RRGGBB" --- • blend: integer between 0 and 100 --- • bold: boolean --- • standout: boolean --- • underline: boolean --- • undercurl: boolean --- • underdouble: boolean --- • underdotted: boolean --- • underdashed: boolean --- • strikethrough: boolean --- • italic: boolean --- • reverse: boolean --- • nocombine: boolean --- • link: name of another highlight group to link to, see |:hi-link|. --- • default: Don't override existing definition |:hi-default| --- • ctermfg: Sets foreground of cterm color |ctermfg| --- • ctermbg: Sets background of cterm color |ctermbg| --- • cterm: cterm attribute map, like |highlight-args|. If not set, cterm attributes will match those from the attribute map documented above. --- • force: if true force update the highlight group when it exists. local hi = function(...) vim.api.nvim_set_hl(0, ...) return end -- let us rock the default theme. -- even though its semantics are broken (just like all the themes out there), the colors are pretty nice. -- also it is guaranteed to work with all the plugins and terminals out there. -- fix default theme semantics, such that READING code is emphazised. hi('@keyword', { link = 'SpecialKey' }) hi('@keyword.return', { link = 'Statement' }) hi('@function', { link = 'Statement' }) hi('@variable.parameter', { link = 'Statement' }) hi('@comment', { link = 'Statement' }) hi('@comment.documentation', { link = 'SpecialKey' })