package main import ( "os" "git.gophernest.net/azpect/TextEditor/internal/program" tea "github.com/charmbracelet/bubbletea" ) // main: Entry point for the Gim text editor. Creates a buffer and window, // initializes the editor model, and runs the BubbleTea TUI program. func main() { // args := os.Args[1:] var prog *tea.Program if len(args) < 1 { prog = program.NewProgramBuilder(). EmptyProgram(). WithOpt(tea.WithAltScreen()). WithOpt(tea.WithMouseCellMotion()). Build() } else { prog = program.NewProgramBuilder(). FileProgram(args[0]). WithOpt(tea.WithAltScreen()). WithOpt(tea.WithMouseCellMotion()). Build() } if _, err := prog.Run(); err != nil { panic(err) } }