Documentation
¶
Index ¶
- func LoadChildren(projectPath, parentPath string, depth int, opts LoadOptions, ...) tea.Cmd
- func LoadFileTree(projectPath string, opts LoadOptions) tea.Cmd
- func LoadFilteredTree(projectPath, query string, opts LoadOptions, statuses map[string]GitFileStatus) tea.Cmd
- func LoadGitStatus(projectPath string) tea.Cmd
- type Component
- type FileNode
- type FileSelectedMsg
- type FileTree
- func (t *FileTree) BindingKeys() []key.Binding
- func (t *FileTree) GetSize() (int, int)
- func (t *FileTree) Init() tea.Cmd
- func (t *FileTree) SelectedFile() string
- func (t *FileTree) SetSize(width, height int) tea.Cmd
- func (t *FileTree) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (t *FileTree) View() string
- type FileTreeRefreshMsg
- type FilterResultsMsg
- type GitFileStatus
- type GitStatusUpdateMsg
- type KeyMap
- type LoadChildrenMsg
- type LoadOptions
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadChildren ¶
func LoadChildren(projectPath, parentPath string, depth int, opts LoadOptions, statuses map[string]GitFileStatus) tea.Cmd
func LoadFileTree ¶
func LoadFileTree(projectPath string, opts LoadOptions) tea.Cmd
func LoadFilteredTree ¶
func LoadFilteredTree(projectPath, query string, opts LoadOptions, statuses map[string]GitFileStatus) tea.Cmd
func LoadGitStatus ¶
Types ¶
type FileNode ¶
type FileNode struct {
Name string
Path string
IsDir bool
IsExpanded bool
Children []*FileNode
GitStatus GitFileStatus
Depth int
Icon string
Loaded bool
}
func NewFileNode ¶
func NewFileNode(name, path string, isDir bool, depth int, status GitFileStatus) *FileNode
func NewRootNode ¶
func (*FileNode) SetExpanded ¶
type FileSelectedMsg ¶
type FileTree ¶
type FileTree struct {
// contains filtered or unexported fields
}
func (*FileTree) BindingKeys ¶
func (*FileTree) SelectedFile ¶
type FileTreeRefreshMsg ¶
type FilterResultsMsg ¶
type GitFileStatus ¶
type GitFileStatus int
const ( GitStatusClean GitFileStatus = iota GitStatusModified GitStatusAdded GitStatusDeleted GitStatusUntracked GitStatusRenamed )
func MergeGitStatus ¶
func MergeGitStatus(current, next GitFileStatus) GitFileStatus
func (GitFileStatus) Priority ¶
func (s GitFileStatus) Priority() int
type GitStatusUpdateMsg ¶
type GitStatusUpdateMsg struct {
Statuses map[string]GitFileStatus
Err error
}
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Expand key.Binding
Collapse key.Binding
Open key.Binding
Search key.Binding
Refresh key.Binding
CancelSearch key.Binding
NewFile key.Binding
}
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
type LoadChildrenMsg ¶
type LoadOptions ¶
type LoadOptions struct {
ShowHidden bool
}
Click to show internal directories.
Click to hide internal directories.