completion

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger added in v0.2.2

func SetLogger(log *slog.Logger)

Types

type CompletionPopup

type CompletionPopup struct {

	// Size configures the max popup dimensions. If no value
	// is provided, a reasonable value is set.
	Size image.Point
	// TextSize configures the size the text displayed in the popup. If no value
	// is provided, a reasonable value is set.
	TextSize unit.Sp
	// Color used to highlight the selected item.
	HighlightColor color.NRGBA
	Theme          *material.Theme
	// contains filtered or unexported fields
}

CompletionPopup is the builtin implementation of a completion popup.

func NewCompletionPopup

func NewCompletionPopup(editor *gvcode.Editor, cmp gvcode.Completion) *CompletionPopup

func (*CompletionPopup) Layout

type DefaultCompletion

type DefaultCompletion struct {
	Editor *gvcode.Editor
	// contains filtered or unexported fields
}

DefaultCompletion is a built-in implementation of the gvcode.Completion API.

func (*DefaultCompletion) AddCompletor added in v0.2.2

func (dc *DefaultCompletion) AddCompletor(completor gvcode.Completor, popup gvcode.CompletionPopup) error

func (*DefaultCompletion) Cancel

func (dc *DefaultCompletion) Cancel()

func (*DefaultCompletion) IsActive

func (dc *DefaultCompletion) IsActive() bool

func (*DefaultCompletion) Layout

func (*DefaultCompletion) Offset

func (dc *DefaultCompletion) Offset() image.Point

func (*DefaultCompletion) OnConfirm

func (dc *DefaultCompletion) OnConfirm(idx int)

func (*DefaultCompletion) OnText

func (dc *DefaultCompletion) OnText(ctx gvcode.CompletionContext)

Jump to

Keyboard shortcuts

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