mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-21 13:56:45 +00:00
fix(rocks): better errors / warnings when something goes wrong with luarocks
This commit is contained in:
parent
9005e8ede7
commit
7d3f69104f
11 changed files with 336 additions and 141 deletions
|
@ -31,18 +31,20 @@ M.colors = {
|
|||
ButtonActive = "Visual",
|
||||
TaskOutput = "MsgArea", -- task output
|
||||
TaskError = "ErrorMsg", -- task errors
|
||||
TaskWarning = "WarningMsg", -- task errors
|
||||
Dir = "@markup.link", -- directory
|
||||
Url = "@markup.link", -- url
|
||||
Bold = { bold = true },
|
||||
Italic = { italic = true },
|
||||
}
|
||||
|
||||
M.did_setup = false
|
||||
|
||||
function M.set_hl()
|
||||
for hl_group, link in pairs(M.colors) do
|
||||
vim.api.nvim_set_hl(0, "Lazy" .. hl_group, {
|
||||
link = link,
|
||||
default = true,
|
||||
})
|
||||
local hl = type(link) == "table" and link or { link = link }
|
||||
hl.default = true
|
||||
vim.api.nvim_set_hl(0, "Lazy" .. hl_group, hl)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -54,6 +56,11 @@ function M.setup()
|
|||
M.did_setup = true
|
||||
|
||||
M.set_hl()
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
M.set_hl()
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
callback = function()
|
||||
M.set_hl()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue