You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim/plugin/catppuccin.vim

16 lines
477 B
VimL

if exists('g:loaded_catppuccin') | finish | endif
function! s:FlavourCompletion(...) abort
return join(sort(luaeval("require'catppuccin.main'.cli_flavour_completion()")), "\n")
endfunction
function! s:ApplyFlavour(args) abort
let l:flavour = matchstr(a:args[0], "[a-z]*")
let g:catppuccin_flavour = flavour
colorscheme catppuccin
endfunction
command! -nargs=1 -complete=custom,s:FlavourCompletion Catppuccin call s:ApplyFlavour([<f-args>])
let g:loaded_catppuccin = 1