code_view

package
v1.75.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Viewport           viewport.Model
	HighlightedContent string
	SyntaxTheme        string
}

func New

func New(syntaxTheme string) Model

New creates a new instance of the model

func (*Model) CursorDown

func (m *Model) CursorDown()

func (*Model) CursorUp

func (m *Model) CursorUp()

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the model

func (*Model) SetContent

func (m *Model) SetContent(content string, language string)

SetContent sets content

func (*Model) SetSize

func (m *Model) SetSize(width int, height int)

SetSize sets the size of the view

func (*Model) SetSyntaxTheme

func (m *Model) SetSyntaxTheme(theme string)

SetSyntaxTheme sets the syntax theme

func (*Model) Update

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

Update handles updating the UI

func (*Model) View

func (m *Model) View() string

View returns a string representation of the model

Jump to

Keyboard shortcuts

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