viewer

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRenderer

func InitRenderer(w int) tea.Cmd

Types

type Viewer

type Viewer struct {
	IsFocused bool
	Height    int
	Width     int
	Viewport  viewport.Model
	Ready     bool
	Path      string
	Renderer  *glamour.TermRenderer
}

func NewViewer

func NewViewer(w int, h int) *Viewer

func (*Viewer) Header

func (m *Viewer) Header() string

func (Viewer) Init

func (m Viewer) Init() tea.Cmd

func (*Viewer) ReadFile

func (m *Viewer) ReadFile() string

func (*Viewer) RenderMarkdown

func (m *Viewer) RenderMarkdown(md string, width int) string

func (*Viewer) Update

func (m *Viewer) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Viewer) View

func (m Viewer) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL