completion

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
	// 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
}

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)

func (*DefaultCompletion) SetCompletors

func (dc *DefaultCompletion) SetCompletors(completors ...gvcode.Completor)

func (*DefaultCompletion) SetPopup

func (dc *DefaultCompletion) SetPopup(popup gvcode.CompletionPopup)

func (*DefaultCompletion) SetTriggers

func (dc *DefaultCompletion) SetTriggers(triggers ...gvcode.Trigger)

Jump to

Keyboard shortcuts

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