diff --git a/nvim/plugin/plugin.go b/nvim/plugin/plugin.go index 9283c36e..9861013e 100644 --- a/nvim/plugin/plugin.go +++ b/nvim/plugin/plugin.go @@ -186,6 +186,14 @@ type CommandOptions struct { // :help command-addr Addr string + // Eval is evaluated in Nvim and the result is passed as an argument. + Eval string + + // Complete specifies command completion. + // + // :help :command-complete + Complete string + // Bang specifies that the command can take a ! modifier (like :q or :w). Bang bool @@ -193,18 +201,10 @@ type CommandOptions struct { // optional register name (like :del, :put, :yank). Register bool - // Eval is evaluated in Nvim and the result is passed as an argument. - Eval string - // Bar specifies that the command can be followed by a "|" and another // command. A "|" inside the command argument is not allowed then. Also // checks for a " to start a comment. Bar bool - - // Complete specifies command completion. - // - // :help :command-complete - Complete string } // HandleCommand registers fn as a handler for a Nvim command. The arguments diff --git a/nvim/types.go b/nvim/types.go index 2363f70d..bf3ff5f9 100644 --- a/nvim/types.go +++ b/nvim/types.go @@ -466,8 +466,8 @@ type OptionInfo struct { // Default is the default value for the option. Default interface{} `msgpack:"default"` - // WasSet whether the option was set. - WasSet bool `msgpack:"was_set"` + // Scope one of "global", "win", or "buf". + Scope string `msgpack:"scope"` // LastSetSid is the last set script id (if any). LastSetSid int `msgpack:"last_set_sid"` @@ -478,8 +478,8 @@ type OptionInfo struct { // LastSetChan is the channel where option was set (0 for local). LastSetChan int `msgpack:"last_set_chan"` - // Scope one of "global", "win", or "buf". - Scope string `msgpack:"scope"` + // WasSet whether the option was set. + WasSet bool `msgpack:"was_set"` // GlobalLocal whether win or buf option has a global value. GlobalLocal bool `msgpack:"global_local"`