components

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRenameProvider

func CreateRenameProvider() *treeview.DefaultNodeProvider[treeview.FileInfo]

CreateRenameProvider constructs the treeview.DefaultNodeProvider used by the TUI and instant execution paths. It wires together:

  • icon rules (status precedes type so success/error override type icons)
  • style rules (normal & focused variants) with precedence similar to icons
  • the custom RenameFormatter for inline original→new labeling.

func NewViewport

func NewViewport(width, height int, th theme.Theme) *viewport.Model

NewViewport constructs a themed viewport with optional overrides.

func RenameFormatter

func RenameFormatter(node *treeview.Node[treeview.FileInfo]) (string, bool)

RenameFormatter produces the display label for a node during visualization.

  • If no metadata or no proposed NewName exists, the original name is returned unchanged.
  • On success, only the new name is shown (keeps the tree clean post-apply).
  • On error, the original name plus the error message are shown.
  • For virtual directory creation, a [NEW] prefix is prepended to the proposed name.
  • If the new name equals the original, the original is shown.
  • Otherwise: "<new> ← <old>" conveys the pending rename mapping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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