viewer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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