settingseditor

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package settingseditor provides a modal TUI component for editing Fern config settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTheme

func ApplyTheme(accent, text, dim lipgloss.Color)

ApplyTheme updates button styles to match the active theme.

Types

type CloseMsg

type CloseMsg struct{}

CloseMsg is sent when the editor should close without applying any changes.

type Model

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

Model is the settings editor TUI component.

func New

func New(scope Scope, cfg *config.Config) Model

New creates a settings editor for the given scope, populated from cfg.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

SetSize sets the available interior width and height for the editor.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View renders the settings editor.

type SaveMsg

type SaveMsg struct {
	Changes map[string]string
}

SaveMsg is sent when the user confirms saving changes. Changes maps TOML key to a TOML-encoded value literal (strings are quoted).

type Scope

type Scope int

Scope identifies which config file the editor is targeting.

const (
	ScopeGlobal Scope = iota
	ScopeVault
)

Jump to

Keyboard shortcuts

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