editor.go 330 B

123456789101112131415161718192021
  1. package repl
  2. import tea "github.com/charmbracelet/bubbletea"
  3. type editorCmp struct{}
  4. func (i *editorCmp) Init() tea.Cmd {
  5. return nil
  6. }
  7. func (i *editorCmp) Update(_ tea.Msg) (tea.Model, tea.Cmd) {
  8. return i, nil
  9. }
  10. func (i *editorCmp) View() string {
  11. return "Editor"
  12. }
  13. func NewEditorCmp() tea.Model {
  14. return &editorCmp{}
  15. }