app

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDirectoryArgument = errors.New(
	"expected a path to file, but found a directory",
)

Functions

func Run

func Run(args []string, out io.Writer) error

Run starts the editor, or writes the health report when --health is the only argument

Types

type App

type App struct {
	ConfigPath string
	Root       string
	ShowPicker bool
	Files      []string

	Editor *view.Editor
	Model  ui.Model
	Reg    *command.Registry
	// contains filtered or unexported fields
}

App is one editor process: the paths resolved from the command line, the editor and its command registry, and the services attached to them. Build it with New, bring it up with Start, take it down with Stop

func New added in v0.1.31

func New(args []string, cwd string) (*App, error)

New resolves the command line into the workspace root, the config path, and the files to open. It touches no editor state; call Start for that

func (*App) Start added in v0.2.3

func (a *App) Start(ctx context.Context) error

Start brings the app up in order: editor and commands, named files, config and init files, the base options those establish, a saved session, then the attached services and the model

func (*App) Stop added in v0.2.3

func (a *App) Stop() error

Stop saves the session and releases everything Start attached

func (*App) WorkspaceTrusted

func (a *App) WorkspaceTrusted() bool

WorkspaceTrusted reports whether the current workspace is trusted

Jump to

Keyboard shortcuts

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