Documentation ¶
Index ¶
- type Code
- func (r *Code) GotoBottom()
- func (r *Code) GotoTop()
- func (r *Code) HalfViewDown()
- func (r *Code) HalfViewUp()
- func (r *Code) Init() tea.Cmd
- func (r *Code) LineDown(n int) []string
- func (r *Code) LineUp(n int) []string
- func (r *Code) ScrollPercent() float64
- func (r *Code) ScrollPosition() int
- func (r *Code) SetContent(c, ext string) tea.Cmd
- func (r *Code) SetSideNote(s string) tea.Cmd
- func (r *Code) SetSize(width, height int)
- func (r *Code) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (r *Code) View() string
- func (r *Code) ViewDown() []string
- func (r *Code) ViewUp() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code struct { *vp.Viewport SideNotePercent float64 TabWidth int ShowLineNumber bool NoContentStyle lipgloss.Style UseGlamour bool // contains filtered or unexported fields }
Code is a code snippet.
func (*Code) GotoBottom ¶
func (r *Code) GotoBottom()
GotoBottom moves the viewport to the bottom of the log.
func (*Code) HalfViewDown ¶
func (r *Code) HalfViewDown()
HalfViewDown moves the viewport down by half the viewport height.
func (*Code) HalfViewUp ¶
func (r *Code) HalfViewUp()
HalfViewUp moves the viewport up by half the viewport height.
func (*Code) ScrollPercent ¶
ScrollPercent returns the viewport's scroll percentage.
func (*Code) ScrollPosition ¶
ScrollPosition returns the viewport's scroll position.
func (*Code) SetContent ¶
SetContent sets the content of the Code.
func (*Code) SetSideNote ¶
SetSideNote sets the sidenote of the Code.
Click to show internal directories.
Click to hide internal directories.