neovim/neovim — pull request #779 by equalsraf (2014-05-29 13:12:02+00:00)
Title: [WIP] Add --api-metadata command line option

This commit adds a new command line option that prints the list of API functions and exits. I've marked this as WIP since I have not yet decided what would be the best format for this information (or if I am missing anything).

The rationale for this comes from this googlegroups [post](https://groups.google.com/forum/#!topic/neovim/tXiZdX4pRDk). The idea is to make it easier to get the API metadata, e.g. for building Neovim bindings in statically typed languages you need this information at compile time.

Right now it prints all function signatures as a space separated table (can_fail, return_type, name, argument types).

e.g.
$ nvim --api-metadata
true WindowArray tabpage_get_windows Tabpage
true Object tabpage_get_var Tabpage String
true Object tabpage_set_var Tabpage String Object
true Window tabpage_get_window Tabpage
false Boolean tabpage_is_valid Tabpage
(...)

but json would probably be a better choice, specially if we want to include more information besides the function signatures. I'm open to suggestions on this.