Documentation ¶
Overview ¶
Package code provides code completion features.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choice ¶
type Choice struct { Class ChoiceClass // is it a type, var, func, or package? Display string // what user is shown Insert string // what gets inserted into code }
Choice is an option shown to the user to make a code completion selection
func ParseGocode ¶
ParseGocode will parse the output of gocode for code completion choices
type ChoiceClass ¶
type ChoiceClass int
ChoiceClass is an enumeration of all possible classes of identifiers
const ( // ClassType indicates a type identifier ClassType ChoiceClass = iota + 1 // ClassVar indicates a var identifier ClassVar // ClassFunc indicates a function identifier ClassFunc // ClassPackage indicates a package identifier ClassPackage // ClassConst indicates a constant identifier ClassConst // ClassPanic may indicate an error in the language server ClassPanic )
type Completer ¶
type Completer struct {
Predictor Predictor
}
Completer provides code completion
func (Completer) Complete ¶
func (c Completer) Complete(ctx context.Context, env gomate.Env, src io.Reader, dst io.Writer) error
Complete will call on the underlying predictor to provide a list of choices to the user. Once a selection has been made by the user, it will be inserted at the cursor by sending it to stdout.
type GoCode ¶
type GoCode struct { }
GoCode is the code predictor wrapper for https://github.com/stamblerre/gocode
Click to show internal directories.
Click to hide internal directories.