Initial commit: terminal file browser & markdown viewer

A beautiful TUI for browsing files and reading markdown/code:
- Two-pane layout with file tree and content viewer
- Markdown rendering via Glamour
- Syntax highlighting via Chroma
- Auto-detects light/dark terminal theme
- Arrow key navigation, Esc to go back
- Page Up/Down, Home/End for scrolling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Davies
2026-01-28 20:13:09 -05:00
commit 8f9c66ba46
12 changed files with 1658 additions and 0 deletions

32
styles.go Normal file
View File

@@ -0,0 +1,32 @@
package main
import "github.com/charmbracelet/lipgloss"
// Styles - these are initialized by SetTheme() in theme.go
var (
activeBorderStyle lipgloss.Style
inactiveBorderStyle lipgloss.Style
directoryStyle lipgloss.Style
fileStyle lipgloss.Style
selectedStyle lipgloss.Style
statusBarStyle lipgloss.Style
statusKeyStyle lipgloss.Style
helpStyle lipgloss.Style
helpTitleStyle lipgloss.Style
helpKeyStyle lipgloss.Style
helpDescStyle lipgloss.Style
titleStyle lipgloss.Style
)
// Icon styles - using Unicode geometric shapes for a clean look
var (
iconDir = "▶"
iconDirOpen = "▼"
iconDoc = "◔"
iconCode = "◇"
iconShell = "▷"
iconData = "◫"
iconWeb = "◈"
iconImage = "◐"
iconDefault = "○"
)