Add support for Neotest
antoineco opened this issue · 1 comments
antoineco commented
I would like to add support for Neotest to the colorscheme, but first I wanted to gauge the interest here by sharing an autocmd which simulates the result:
vim.api.nvim_create_autocmd("ColorScheme", {
group = vim.api.nvim_create_augroup("user_nvim_init", {}),
pattern = "mellifluous",
callback = function()
local colors = require "mellifluous.colors".get_colors()
local palette = {
ui_red = colors.ui_red.hex,
ui_green = colors.ui_green.hex,
ui_yellow = colors.ui_yellow.hex,
ui_blue = colors.ui_blue.hex,
green = colors.green.hex,
purple = colors.purple.hex,
yellow = colors.yellow.hex
}
local function set_hl(name, val)
vim.api.nvim_set_hl(0, name, val)
end
set_hl("NeotestPassed", { fg = palette.ui_green })
set_hl("NeotestFailed", { fg = palette.ui_red })
set_hl("NeotestRunning", { fg = palette.ui_yellow })
set_hl("NeotestSkipped", { fg = palette.ui_blue })
set_hl("NeotestFile", { fg = palette.purple })
set_hl("NeotestDir", { link = "Directory" })
set_hl("NeotestAdapterName", { link = "Title" })
set_hl("NeotestMarked", { fg = palette.green, bold = true })
set_hl("NeotestTarget", { fg = palette.yellow })
end
})