Help us shape the future of Go! Take the 2026 Go Developer Survey

palette

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionHost

type ActionHost interface {
	feature.BaseHost
	PromptActive() bool
	ContentWidth() int

	ActiveTab() panel.Tab
	ActivePanel() panel.Panel
	SelectedListItem() (panel.Item, bool)
	CommandSpecs() []commands.Spec
}

ActionHost exposes palette catalog actions without *Model in callbacks.

type Feature

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

Feature owns the Ctrl+P command palette.

func New

func New(host ActionHost) *Feature

New returns a palette feature wired to host.

func (*Feature) Active

func (f *Feature) Active() bool

func (*Feature) Close

func (f *Feature) Close()

func (*Feature) Init

func (f *Feature) Init() tea.Cmd

func (*Feature) MatchCount

func (f *Feature) MatchCount() int

MatchCount returns the number of filtered palette entries (for tests).

func (*Feature) Name

func (f *Feature) Name() string

func (*Feature) Open

func (f *Feature) Open() (tea.Model, tea.Cmd)

func (*Feature) RenderOverlay

func (f *Feature) RenderOverlay(base string) string

func (*Feature) ResizeInput

func (f *Feature) ResizeInput()

func (*Feature) TopMatchTitle

func (f *Feature) TopMatchTitle() string

TopMatchTitle returns the title of the top filtered entry (for tests).

func (*Feature) Update

func (f *Feature) Update(msg tea.Msg) (tea.Cmd, bool)

func (*Feature) View

func (f *Feature) View(width, height int) string

Jump to

Keyboard shortcuts

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