filetree

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 16 Imported by: 1 module, 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

This section is empty.

Types

type KeyMap added in v0.8.0

type KeyMap struct {
	ExpandNode   key.Binding
	CollapseNode key.Binding
	ToggleNode   key.Binding
}

type Model

type Model struct {
	common.Common
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config, styles *common.Styles) Model

func (*Model) CopyCurrNodePath added in v0.8.0

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

func (*Model) CurrNodePath added in v0.8.0

func (m *Model) CurrNodePath() string

func (*Model) Down added in v0.8.0

func (m *Model) Down()

func (*Model) GetCurrNode added in v0.8.0

func (m *Model) GetCurrNode() *tree.Node

func (*Model) GetCurrNodeDesendantDiffs added in v0.8.0

func (m *Model) GetCurrNodeDesendantDiffs() []*gitdiff.File

func (Model) GetNodeAtY added in v0.8.0

func (m Model) GetNodeAtY(yoffset int) *tree.Node

GetNodeAtY returns the tree's node at the Y scroll offset.

func (*Model) GoToBottom added in v0.12.0

func (m *Model) GoToBottom()

func (*Model) GoToTop added in v0.12.0

func (m *Model) GoToTop()

func (*Model) NextFile added in v0.11.0

func (m *Model) NextFile() bool

NextFile moves the cursor to the next file node, skipping directories.

func (*Model) PrevFile added in v0.11.0

func (m *Model) PrevFile() bool

PrevFile moves the cursor to the previous file node, skipping directories.

func (*Model) ScrollDown added in v0.4.0

func (m *Model) ScrollDown(lines int)

ScrollDown scrolls the viewport down by the given number of lines.

func (*Model) ScrollUp added in v0.4.0

func (m *Model) ScrollUp(lines int)

ScrollUp scrolls the viewport up by the given number of lines.

func (*Model) SetCursorByPath added in v0.8.0

func (m *Model) SetCursorByPath(path string)

func (*Model) SetCursorNoScroll added in v0.4.0

func (m *Model) SetCursorNoScroll(cursor int)

SetCursorNoScroll updates the selected file without scrolling the viewport. Use this when the user clicks on a file they can already see.

func (Model) SetFiles

func (m Model) SetFiles(files []*gitdiff.File) Model

func (*Model) SetIconStyle added in v0.5.0

func (m *Model) SetIconStyle(iconStyle string)

SetIconStyle changes the icon style and regenerates the tree.

func (*Model) SetSize

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

SetSize implements the Component interface.

func (*Model) SetStyles added in v0.13.0

func (m *Model) SetStyles(styles *common.Styles)

func (*Model) Up added in v0.8.0

func (m *Model) Up()

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

func (Model) ViewportYOffset added in v0.7.0

func (m Model) ViewportYOffset() int

ViewportYOffset returns the tree's current Y scroll offset.

func (*Model) Width added in v0.7.0

func (m *Model) Width() int

Jump to

Keyboard shortcuts

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