myitcv / neovim

Go package for writing Neovim plugins (in Go!)
http://godoc.org/github.com/myitcv/neovim
MIT License
85 stars 4 forks source link

Finalise the specification of how Go plugins will be written #23

Open myitcv opened 9 years ago

myitcv commented 9 years ago
// n args and m ret vals
// requires two error ret vals as last two return values

//neovim:wrapper Example SyncMethod
func (e *Example) SyncMethod(arg1 string, arg2 int, ...) (ret1 string, ret2 int, ..., error, error) {
  ...
}
// n args
// single error ret val

//neovim:wrapper Example AsyncMethod
func (e *Example) AsyncMethod(arg1 string, arg2 int, ...) error {
  ...
}
myitcv commented 9 years ago

Further notes here: https://github.com/myitcv/neovim/wiki/Plugin-defined-functions,-commands-and-autocommands