compl

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplResult

type ComplResult int
const (
	Matched ComplResult = iota
	NotMatched
	Aborted
	Errored
)

type Completion

type Completion struct {
	CompletionSource `yaml:",inline"`
	Pattern          string `yaml:"pattern"`
	Replacement      string `yaml:"replacement"`
	ItemSeparator    string `default:" " yaml:"itemSeparator"`
	Layout           string `yaml:"layout"`
}

func NewCompletion

func NewCompletion(pattern string) *Completion

func (*Completion) MatchAndFind

func (c *Completion) MatchAndFind(line string, options CompletionOptions) ([]string, ComplResult)

type CompletionOptions

type CompletionOptions struct {
	ReturnAll bool
}

type CompletionResult

type CompletionResult struct {
	Items []string
}

type CompletionSource

type CompletionSource struct {
	Command      string      `yaml:"cmd"`
	ItemTmpl     string      `yaml:"map"`
	PreviewTmpl  string      `yaml:"preview"`
	HeaderLines  int         `yaml:"headerLines"`
	Header       interface{} `yaml:"header"`
	SelectOne    bool        `yaml:"selectOne"`
	PreferHeader bool        `yaml:"selectHeader"`
}

type MatchResult

type MatchResult struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL