Documentation
¶
Index ¶
- Variables
- func ChangedOptionValues(base, values map[string]string) map[string]string
- func Run(args []string, out io.Writer) error
- type App
- func (a *App) ApplyConfigFiles() error
- func (a *App) ApplyInitFile() error
- func (a *App) ConfigureModel() error
- func (a *App) InitLSP(ctx context.Context) func()
- func (a *App) InitReg() error
- func (a *App) MaybeRestoreSession(trusted func() bool) error
- func (a *App) MaybeSaveSession(base map[string]string) error
- func (a *App) OpenEditorFiles() error
- func (a *App) ParseConfigFlag(args []string) []string
- func (a *App) ResolveSession(args []string, cwd string) error
- func (a *App) WorkspaceTrusted() bool
Constants ¶
This section is empty.
Variables ¶
var ErrDirectoryArgument = errors.New(
"expected a path to file, but found a directory",
)
Functions ¶
func ChangedOptionValues ¶
ChangedOptionValues returns only the entries in values that differ from base
Types ¶
type App ¶
type App struct {
ConfigPath string
Root string
PickerDir string
Files []string
Editor *view.Editor
Model ui.Model
Reg *command.Registry
// contains filtered or unexported fields
}
func (*App) ApplyConfigFiles ¶
ApplyConfigFiles merges workspace and explicit config TOML into the editor
func (*App) ApplyInitFile ¶ added in v0.1.31
ApplyInitFile evaluates user and trusted workspace init.ale files
func (*App) ConfigureModel ¶
ConfigureModel sets the initial picker and any startup message on the model
func (*App) MaybeRestoreSession ¶
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 ¶
MaybeSaveSession saves the session if AutoSession is enabled and trusted
func (*App) OpenEditorFiles ¶
OpenEditorFiles opens each path in Files into the editor
func (*App) ParseConfigFlag ¶
ParseConfigFlag strips --config and its value from args into ConfigPath
func (*App) ResolveSession ¶
ResolveSession populates Root, PickerDir, and Files from args
func (*App) WorkspaceTrusted ¶
WorkspaceTrusted reports whether the current workspace is trusted