package nvim

import "github.com/neovim/go-client/nvim"

Package nvim implements a Nvim client.

See the ./plugin package for additional functionality required for writing
Nvim plugins.

The Nvim type implements the client. To connect to a running instance of
Nvim, create a *Nvim value using the New or NewEmbedded functions and call
the Serve() method to process RPC messages. Call the Close() method to
release the resources used by the client.

Use the Batch type to execute a sequence of Nvim API calls atomically. The
Nvim NewBatch method creates new *Batch values.

The function calls in the batch are executed without processing requests
from other clients, redrawing or allowing user interaction in between.
Functions that could fire autocommands or do event processing still might do
so. For instance invoking the :sleep command might call timer callbacks.

Call the Execute() method to execute the commands in the batch. Result
parameters in the API function calls are set in the call to Execute. If an
API function call fails, all results proceeding the call are set and a
*BatchError is returned.

AddBufferHighlight adds a highlight to buffer and returns the source id of
the highlight.

AddBufferHighlight can be used for plugins which dynamically generate
highlights to a buffer (like a semantic highlighter or linter). The function
adds a single highlight to a buffer. Unlike matchaddpos() highlights follow
changes to line numbering (as lines are inserted/removed above the
highlighted line), like signs and marks do.

The srcID is useful for batch deletion/updating of a set of highlights. When
called with srcID = 0, an unique source id is generated and returned.
Succesive calls can pass in it as srcID to add new highlights to the same
source group. All highlights in the same group can then be cleared with
ClearBufferHighlight. If the highlight never will be manually deleted pass
in -1 for srcID.

If hlGroup is the empty string no highlight is added, but a new srcID is
still returned. This is useful for an external plugin to synchrounously
request an unique srcID at initialization, and later asynchronously add and
clear highlights in response to buffer changes.

The startCol and endCol parameters specify the range of columns to
highlight. Use endCol = -1 to highlight to the end of the line.

type CommandCompletionArgs struct {
// ArgLead is the leading portion of the argument currently being completed
// on.ArgLeadstring `msgpack:",array"`
// CmdLine is the entire command line.CmdLinestring// CursorPosString is decimal representation of the cursor position in
// bytes.CursorPosStringstring
}

CommandCompletionArgs represents the arguments to a custom command line
completion function.

type EmbedOptions struct {
// Args specifies the command line arguments. Do not include the program
// name (the first argument) or the --embed option.Args []string// Dir specifies the working directory of the command. The working
// directory in the current process is used if Dir is "".Dirstring// Env specifies the environment of the Nvim process. The current process
// environment is used if Env is nil.Env []string// Path is the path of the command to run. If Path = "", then
// StartEmbeddedNvim searches for "nvim" on $PATH.PathstringLogf func(string, ...interface{})
}

EmbedOptions specifies options for starting an embedded instance of Nvim.

AddBufferHighlight adds a highlight to buffer and returns the source id of
the highlight.

AddBufferHighlight can be used for plugins which dynamically generate
highlights to a buffer (like a semantic highlighter or linter). The function
adds a single highlight to a buffer. Unlike matchaddpos() highlights follow
changes to line numbering (as lines are inserted/removed above the
highlighted line), like signs and marks do.

The srcID is useful for batch deletion/updating of a set of highlights. When
called with srcID = 0, an unique source id is generated and returned.
Succesive calls can pass in it as srcID to add new highlights to the same
source group. All highlights in the same group can then be cleared with
ClearBufferHighlight. If the highlight never will be manually deleted pass
in -1 for srcID.

If hlGroup is the empty string no highlight is added, but a new srcID is
still returned. This is useful for an external plugin to synchrounously
request an unique srcID at initialization, and later asynchronously add and
clear highlights in response to buffer changes.

The startCol and endCol parameters specify the range of columns to
highlight. Use endCol = -1 to highlight to the end of the line.

type QuickfixError struct {
// Buffer numberBufnrint `msgpack:"bufnr,omitempty"`
// Line number in the file.LNumint `msgpack:"lnum,omitempty"`
// Search pattern used to locate the error.Patternstring `msgpack:"pattern,omitempty"`
// Column number (first column is 1).Colint `msgpack:"col,omitempty"`
// When Vcol is != 0, Col is visual column.VColint `msgpack:"vcol,omitempty"`
// Error number.Nrint `msgpack:"nr,omitempty"`
// Description of the error.Textstring `msgpack:"text,omitempty"`
// Single-character error type, 'E', 'W', etc.Typestring `msgpack:"type,omitempty"`
// Name of a file; only used when bufnr is not present or it is invalid.FileNamestring `msgpack:"filename,omitempty"`
// Valid is non-zero if this is a recognized error message.Validint `msgpack:"valid,omitempty"`
}