Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
ConfigDir returns the fur configuration directory. Migrates from the legacy ~/.config/lookit path if it exists.
func CreateDefault ¶
CreateDefault writes a default config file to ~/.config/fur/config.yaml if one does not already exist. Returns the path written, or empty string if a config already exists.
Types ¶
type Config ¶
type Config struct {
// Root directory to browse
Root string `mapstructure:"root"`
// Theme: light, dark, or auto
Theme string `mapstructure:"theme"`
// Keymap preset: default, vim, emacs
Keymap string `mapstructure:"keymap"`
// Web server settings
Server ServerConfig `mapstructure:"server"`
// Git integration settings
Git GitConfig `mapstructure:"git"`
// File patterns to ignore (in addition to .gitignore)
Ignore []string `mapstructure:"ignore"`
// Mouse enables mouse wheel scrolling in TUI
Mouse bool `mapstructure:"mouse"`
// ReadingGuide shows a full-row highlight on the cursor line
ReadingGuide bool `mapstructure:"reading_guide"`
// ScrollOff keeps this many lines visible above/below the cursor
ScrollOff int `mapstructure:"scrolloff"`
// Debug enables verbose logging
Debug bool `mapstructure:"debug"`
// Remote holds named remote host configurations
Remotes map[string]RemoteConfig `mapstructure:"remotes"`
}
Config holds all application configuration.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns configuration with sensible defaults.
type GitConfig ¶
type GitConfig struct {
Enabled bool `mapstructure:"enabled"`
ShowStatus bool `mapstructure:"show_status"`
Remote string `mapstructure:"remote"`
}
GitConfig holds git integration settings.
type RecentFiles ¶
type RecentFiles struct {
Files []string `json:"files"`
// contains filtered or unexported fields
}
RecentFiles manages a persistent list of recently opened files.
func LoadRecentFiles ¶
func LoadRecentFiles() *RecentFiles
LoadRecentFiles reads the recent files list from disk.
func (*RecentFiles) Add ¶
func (r *RecentFiles) Add(path string)
Add puts a file at the front of the recent list, removing duplicates.
func (*RecentFiles) Save ¶
func (r *RecentFiles) Save() error
Save writes the recent files list to disk.