feat: CPClear command to clear all highlights

dev-doc
Pocco81 3 years ago
parent e9999661df
commit 708732c79e

@ -17,13 +17,19 @@ local function load(args)
end end
end end
local function clear()
vim.cmd("hi clear")
end
function M.main(option, args) function M.main(option, args)
option = option or "load" option = option or "load"
if option == "load" then if option == "load" then
load(args) load(args)
elseif option == "clear" then
clear()
else else
print("Catppuccino: command was not recognized") print("Catppuccino: option was not recognized")
end end
end end

@ -27,6 +27,7 @@ endfunction
" Interface {{{ " Interface {{{
command! -nargs=+ -complete=custom,s:complete_args_flavors CPLoad call v:lua.require'catppuccino.main'.main('load',cpcmds#get_first_arg(<f-args>)) command! -nargs=+ -complete=custom,s:complete_args_flavors CPLoad call v:lua.require'catppuccino.main'.main('load',cpcmds#get_first_arg(<f-args>))
command! -nargs=0 CPClear call v:lua.require'catppuccino.main'.main('clear')
" }}} " }}}
let &cpo = s:save_cpo " restore after let &cpo = s:save_cpo " restore after

Loading…
Cancel
Save