▍ humdrum codex / glint v1.0.2

style: gofmt (struct field + decl alignment across editor/app/preview)

a0797b7fe1c43a76ccaebb94051274e37171e6b1
humdrum <me@humdrum.me> · 2026-06-28 16:03

parent 39bd9083

5 files changed

internal/app/app.go +4 −4
@@ -35,7 +35,7 @@ // pendingDiscard tracks which open-while-dirty action is awaiting confirmation.
 type pendingDiscard int
 
 const (
-	discardNone   pendingDiscard = iota
+	discardNone pendingDiscard = iota
 	discardPicker
 	discardDaily
 	discardNew
@@ -51,9 +51,9 @@ )
 
 // App is the root model.
 type App struct {
-	mode    Mode
-	cfg     config.Config
-	theme   theme.Theme
+	mode      Mode
+	cfg       config.Config
+	theme     theme.Theme
 	editor    *editor.Editor
 	preview   *preview.Model
 	picker    *picker.Model
internal/editor/editor.go +8 −8
@@ -17,14 +17,14 @@
 // Editor is a self-contained markdown text buffer. It knows nothing about
 // files or the vault; the app wires load and save around it.
 type Editor struct {
-	Lines  []string
-	Cursor Position
-	Scroll int
-	Dirty  bool
-	Width  int
-	Height int // visible text rows
+	Lines   []string
+	Cursor  Position
+	Scroll  int
+	Dirty   bool
+	Width   int
+	Height  int // visible text rows
 	goalCol int // remembered visual column for vertical moves
-	theme  theme.Theme
+	theme   theme.Theme
 }
 
 // New returns an empty editor with one blank line and the default theme.
@@ -68,7 +68,7 @@ 	e.Height = h
 	e.followCursor()
 }
 
-func (e *Editor) curLine() []rune { return []rune(e.Lines[e.Cursor.Row]) }
+func (e *Editor) curLine() []rune   { return []rune(e.Lines[e.Cursor.Row]) }
 func (e *Editor) setLine(rs []rune) { e.Lines[e.Cursor.Row] = string(rs) }
 
 // InsertRune inserts r at the cursor and advances it.
internal/editor/editor_test.go +1 −1
@@ -261,7 +261,7 @@
 func TestScrollIsVisualRowIndex(t *testing.T) {
 	e := New()
 	e.Lines = []string{"aaaa bbbb cccc dddd eeee ffff"} // one logical line, many visual rows at width 9
-	e.SetSize(9, 2)                                      // only 2 visible visual rows
+	e.SetSize(9, 2)                                     // only 2 visible visual rows
 	e.Cursor = Position{Row: 0, Col: 0}
 	// Move down several visual rows; Scroll must follow so the cursor stays visible.
 	for i := 0; i < 3; i++ {
internal/editor/scanner.go +2 −2
@@ -125,8 +125,8 @@ 	}
 
 	// key: value — split at the first colon. Keep the colon with the key.
 	if idx := strings.IndexByte(line, ':'); idx >= 0 {
-		key := line[:idx+1]   // includes the colon
-		rest := line[idx+1:]  // remainder (may start with a space)
+		key := line[:idx+1]  // includes the colon
+		rest := line[idx+1:] // remainder (may start with a space)
 		spans := []Span{{Text: key, Style: accent}}
 		if rest != "" {
 			spans = append(spans, Span{Text: rest, Style: plain})
internal/preview/preview.go +8 −8
@@ -5,8 +5,8 @@
 import (
 	"os"
 
-	tea "github.com/charmbracelet/bubbletea"
 	"github.com/charmbracelet/bubbles/viewport"
+	tea "github.com/charmbracelet/bubbletea"
 	"github.com/charmbracelet/glamour"
 )
 
@@ -60,13 +60,13 @@ }
 
 // knownStyles maps glamour's known builtin style names.
 var knownStyles = map[string]bool{
-	"ascii":        true,
-	"dark":         true,
-	"light":        true,
-	"dracula":      true,
-	"tokyo-night":  true,
-	"notty":        true,
-	"pink":         true,
+	"ascii":       true,
+	"dark":        true,
+	"light":       true,
+	"dracula":     true,
+	"tokyo-night": true,
+	"notty":       true,
+	"pink":        true,
 }
 
 // renderer builds a Glamour renderer, treating m.style as a file path when it