fuzzy

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFuzzy

func NewFuzzy(
	ctx context.Context,
	bg image.Image,
	options []Option,
	location geom.Vec2,
	tree *tree.Tree,
	client *server.Client,
	result chan<- interface{},
) *taro.Program

Types

type AttachEvent added in v0.1.5

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

type DetachEvent added in v0.1.5

type DetachEvent struct {
}

type Fuzzy

type Fuzzy struct {
	util.Lifetime
	// contains filtered or unexported fields
}

func (*Fuzzy) Attach added in v0.1.5

func (f *Fuzzy) Attach(id tree.NodeID) taro.Cmd

func (*Fuzzy) Init added in v0.1.1

func (f *Fuzzy) Init() taro.Cmd

func (*Fuzzy) Update added in v0.1.1

func (f *Fuzzy) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Fuzzy) View added in v0.1.1

func (f *Fuzzy) View(state *tty.State)

type Match

type Match struct {
	Score int
	Index *[]int
}

type Option

type Option struct {
	Text string
	// Supported types:
	// - string: will be passed to a blank terminal
	// - NodeID: will show in the background
	Preview interface{}
	Chars   *util.Chars
	Match   *Match
	Result  interface{}
}

func Filter

func Filter(options []Option, search string) []Option

func UnmarshalOptions

func UnmarshalOptions(input *janet.Value) (result []Option, err error)

Directories

Path Synopsis
fzf

Jump to

Keyboard shortcuts

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