minimal extui fuzzy finder for neovim

fix(plugin): clean up highlights

+10 -16
+10 -16
plugin/artio.lua
··· 9 vim.api.nvim_create_autocmd("ColorScheme", { 10 group = augroup, 11 callback = function() 12 local normal_hl = vim.api.nvim_get_hl(0, { name = "Normal" }) 13 local msgarea_hl = vim.api.nvim_get_hl(0, { name = "MsgArea" }) 14 15 - vim.api.nvim_set_hl(0, "ArtioNormal", { fg = normal_hl.fg, bg = msgarea_hl.bg, default = true }) 16 - vim.api.nvim_set_hl(0, "ArtioPrompt", { link = "Title", default = true }) 17 18 local cursor_hl = vim.api.nvim_get_hl(0, { name = "Cursor" }) 19 local cursorline_hl = vim.api.nvim_get_hl(0, { name = "CursorLine" }) 20 - vim.api.nvim_set_hl(0, "ArtioSel", { fg = cursor_hl.bg, bg = cursorline_hl.bg, default = true }) 21 - vim.api.nvim_set_hl(0, "ArtioPointer", { fg = cursor_hl.bg, default = true }) 22 - 23 - vim.api.nvim_set_hl(0, "ArtioMatch", { link = "PmenuMatch", default = true }) 24 - end, 25 - }) 26 27 - vim.api.nvim_create_autocmd("ColorSchemePre", { 28 - group = augroup, 29 - callback = function() 30 - vim.api.nvim_set_hl(0, "ArtioNormal", {}) 31 - vim.api.nvim_set_hl(0, "ArtioPrompt", {}) 32 - vim.api.nvim_set_hl(0, "ArtioSel", {}) 33 - vim.api.nvim_set_hl(0, "ArtioPointer", {}) 34 - vim.api.nvim_set_hl(0, "ArtioMatch", {}) 35 end, 36 }) 37
··· 9 vim.api.nvim_create_autocmd("ColorScheme", { 10 group = augroup, 11 callback = function() 12 + local hi = function(name, opts) 13 + opts.default = true 14 + vim.api.nvim_set_hl(0, name, opts) 15 + end 16 + 17 local normal_hl = vim.api.nvim_get_hl(0, { name = "Normal" }) 18 local msgarea_hl = vim.api.nvim_get_hl(0, { name = "MsgArea" }) 19 20 + hi("ArtioNormal", { fg = normal_hl.fg, bg = msgarea_hl.bg }) 21 + hi("ArtioPrompt", { link = "Title" }) 22 23 local cursor_hl = vim.api.nvim_get_hl(0, { name = "Cursor" }) 24 local cursorline_hl = vim.api.nvim_get_hl(0, { name = "CursorLine" }) 25 + hi("ArtioSel", { fg = cursor_hl.bg, bg = cursorline_hl.bg }) 26 + hi("ArtioPointer", { fg = cursor_hl.bg }) 27 28 + hi("ArtioMatch", { link = "PmenuMatch" }) 29 end, 30 }) 31