Created
June 15, 2016 21:27
-
-
Save mhinz/55c6dd6ea137454b16a654c3a1f20dc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:dump_api() | |
let api = msgpackparse(systemlist('nvim --api-info'))[0] | |
for v in api.functions | |
echohl Function | |
echomsg v.name._VAL[0] | |
echohl NONE | |
echohl Title | |
echon '('. join(map(v.parameters, 'v:val[1]._VAL[0] .":". v:val[0]._VAL[0]'), ', ') .')' | |
echohl NONE | |
echon ' -> ' | |
echohl Constant | |
echon v.return_type._VAL[0] | |
echohl NONE | |
echohl Comment | |
echon ' async: '. (v.async ? '✓' : '☓') .', can fail: '. (has_key(v, 'can_fail') && v.can_fail ? '✓' : '☓') | |
echohl NONE | |
endfor | |
endfunction | |
command! DumpAPI call s:dump_api() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment