cord-nvim 2.0.0-beta.16

🚀 The most extensible Discord Rich Presence plugin for Neovim, powered by Rust.
1
2
3
4
5
6
7
8
9
10
11
12
augroup Cord
    autocmd!
    autocmd VimLeavePre * lua require 'cord.server':cleanup()
augroup END

function! CordCompleteList(ArgLead, CmdLine, CmdPos)
    let completions = ['version', 'check_version', 'status', 'update', 'build', 'fetch', 'show_presence', 'hide_presence', 'toggle_presence', 'clear_presence', 'idle', 'unidle', 'toggle_idle', 'restart', 'shutdown']
    
    return filter(completions, 'v:val =~ "^" . a:ArgLead')
endfunction

command! -nargs=1 -complete=customlist,CordCompleteList Cord lua require'cord.api.usercmd'.handle({<f-args>})