app

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ChangedOptionValues

func ChangedOptionValues(base, values map[string]string) map[string]string

ChangedOptionValues returns only the entries in values that differ from base

func Run

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

Types

type App

type App struct {
	ConfigPath string
	Root       string
	PickerDir  string
	Files      []string
	Editor     *view.Editor
	Model      ui.Model
	Reg        *command.Registry
}

func (*App) ApplyConfigFiles

func (a *App) ApplyConfigFiles() error

ApplyConfigFiles merges workspace and explicit config TOML into the editor

func (*App) ConfigureModel

func (a *App) ConfigureModel() error

ConfigureModel sets the initial picker and any startup message on the model

func (*App) InitLSP

func (a *App) InitLSP(ctx context.Context) func()

InitLSP attaches the LSP session and wires the config-reload callback

func (*App) InitReg

func (a *App) InitReg() error

InitReg wires up keymaps, model, and command registry

func (*App) MaybeRestoreSession

func (a *App) MaybeRestoreSession(trusted func() bool) error

MaybeRestoreSession restores a saved session when no files were given and the workspace is trusted; clears PickerDir when a session is restored

func (*App) MaybeSaveSession

func (a *App) MaybeSaveSession(base map[string]string) error

MaybeSaveSession saves the session if AutoSession is enabled and trusted

func (*App) OpenEditorFiles

func (a *App) OpenEditorFiles() error

OpenEditorFiles opens each path in Files into the editor

func (*App) ParseConfigFlag

func (a *App) ParseConfigFlag(args []string) []string

ParseConfigFlag strips --config and its value from args into ConfigPath

func (*App) ResolveSession

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

ResolveSession populates Root, PickerDir, and Files from args

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