viewer

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Viewer

type Viewer struct {
	IsFocused   bool
	Height      int
	Width       int
	Viewport    viewport.Model
	Ready       bool
	ShowFinder  bool
	Path        string
	Content     []string
	Highlighted int

	Renderer *glamour.TermRenderer
	Keymap   keymap.ViewerKeyMap
	Finder   fzf.FuzzyFinder
	// contains filtered or unexported fields
}

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