TermColor.Repl #
Pure input history, key handling, and adaptive completion for terminal REPLs. The terminal loop is intentionally separate so applications can keep ownership of their model and transcript while reusing this state machine.
- text : CompletionKind
- file : CompletionKind
- directory : CompletionKind
- executable : CompletionKind
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
- TermColor.Repl.instBEqCompletionKind.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
@[instance_reducible]
- replacement : String
- label : String
- kind : CompletionKind
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Repl.instBEqCompletion.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
- candidates : Array Completion
- selected : Nat
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- input : Widgets.TextInputState
- completion : Option CompletionMenu
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
- TermColor.Repl.instReprState = { reprPrec := TermColor.Repl.instReprState.repr }
- text : Widgets.TextInputConfig
- lineBreak : Widgets.Key
- keymap : Option (Keymap EditorAction)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Equations
- TermColor.Repl.instBEqAction.beq TermColor.Repl.Action.changed TermColor.Repl.Action.changed = true
- TermColor.Repl.instBEqAction.beq (TermColor.Repl.Action.submit a) (TermColor.Repl.Action.submit b) = (a == b)
- TermColor.Repl.instBEqAction.beq TermColor.Repl.Action.quit TermColor.Repl.Action.quit = true
- TermColor.Repl.instBEqAction.beq x✝¹ x✝ = false
Instances For
@[instance_reducible]
Equations
@[instance_reducible]
Equations
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.changed TermColor.Repl.Action.changed = isTrue ⋯
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.changed (TermColor.Repl.Action.submit line) = isFalse ⋯
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.changed TermColor.Repl.Action.quit = isFalse TermColor.Repl.instDecidableEqAction.decEq._proof_2
- TermColor.Repl.instDecidableEqAction.decEq (TermColor.Repl.Action.submit line) TermColor.Repl.Action.changed = isFalse ⋯
- TermColor.Repl.instDecidableEqAction.decEq (TermColor.Repl.Action.submit a) (TermColor.Repl.Action.submit b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- TermColor.Repl.instDecidableEqAction.decEq (TermColor.Repl.Action.submit line) TermColor.Repl.Action.quit = isFalse ⋯
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.quit TermColor.Repl.Action.changed = isFalse TermColor.Repl.instDecidableEqAction.decEq._proof_7
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.quit (TermColor.Repl.Action.submit line) = isFalse ⋯
- TermColor.Repl.instDecidableEqAction.decEq TermColor.Repl.Action.quit TermColor.Repl.Action.quit = isTrue ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TermColor.Repl.completeInput input [] = input
- TermColor.Repl.completeInput input [candidate] = TermColor.Repl.applyCompletion✝ input candidate
Instances For
def
TermColor.Repl.renderMultilineTextInputBody
(config : Widgets.TextInputConfig)
(state : Widgets.TextInputState)
(focused : Bool := false)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Render a width-bounded completion menu with a selected row and kind markers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
TermColor.Repl.updateMultilineWithKeymap
(config : MultilineConfig)
(keymap : Keymap EditorAction)
(complete : Widgets.TextInputState → List Completion)
(state : State)
(key : Widgets.Key)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
TermColor.Repl.updateMultiline
(config : MultilineConfig)
(complete : Widgets.TextInputState → List Completion)
(state : State)
(key : Widgets.Key)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
TermColor.Repl.updateWithKeymap
(config : Widgets.TextInputConfig)
(keymap : Keymap EditorAction)
(complete : Widgets.TextInputState → List Completion)
(state : State)
(key : Widgets.Key)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
TermColor.Repl.update
(config : Widgets.TextInputConfig)
(complete : Widgets.TextInputState → List Completion)
(state : State)
(key : Widgets.Key)
:
Equations
- TermColor.Repl.update config complete state key = TermColor.Repl.updateWithKeymap config TermColor.Repl.defaultEditorKeymap complete state key