refactor(lua): replace vim.cmd use with API calls (#19283)

Signed-off-by: Raphael <glephunter@gmail.com>
This commit is contained in:
Raphael
2022-07-10 00:40:32 +08:00
committed by GitHub
parent 7dbe6b1a46
commit 6b1a8f23d7
4 changed files with 71 additions and 87 deletions

View File

@@ -16,7 +16,7 @@ local _default_highlights = {}
local _link_default_highlight_once = function(from, to)
if not _default_highlights[from] then
_default_highlights[from] = true
vim.cmd(string.format('highlight default link %s %s', from, to))
a.nvim_set_hl(0, from, { link = to, default = true })
end
return from