Documentation
¶
Index ¶
- Constants
- Variables
- func CacheDir() (string, bool)
- func CanonicalPath(path string) string
- func ConfigDir() (string, bool)
- func ConfigFile() (string, bool)
- func ConfigIgnoreFile() string
- func DataDir() (string, bool)
- func DefaultLanguages() (map[string]any, bool)
- func ExpandUserPath(path string) string
- func FindWorkspace(dir string) (string, bool)
- func LanguagesFile() (string, bool)
- func LoadThemeTOML(name string) (map[string]any, error)
- func LogFile() (string, bool)
- func QueryWorkspaceTrust(dir string, insecure bool) bool
- func ThemeNames() []string
- func TrustWorkspace(dir string) error
- func UntrustWorkspace(dir string) error
- func WorkspaceConfigFile(dir string) string
- func WorkspaceInitFile(dir string) string
- func WorkspaceLanguagesFile(dir string) string
- func WorkspaceTrustFile() (string, bool)
- type WorkspaceFiles
Constants ¶
const ( DirName = "toe" LogFileName = "toe.log" WorkspaceDirName = "." + DirName )
Variables ¶
var ( ErrThemeNotFound = errors.New("theme not found") ErrThemeCycle = errors.New("theme inheritance cycle") )
Functions ¶
func CanonicalPath ¶ added in v0.1.27
CanonicalPath resolves symlinks in path's parent directory and joins the unresolved final element
func ConfigIgnoreFile ¶
func ConfigIgnoreFile() string
ConfigIgnoreFile returns the user's picker ignore-file path
func DefaultLanguages ¶ added in v0.4.0
DefaultLanguages returns the cached bundled language defaults. Do not mutate
func ExpandUserPath ¶
ExpandUserPath expands leading home-directory shorthand and environment vars
func FindWorkspace ¶
FindWorkspace walks up for a .git or .toe directory. The bool reports a fallback to dir itself, not success
func LanguagesFile ¶
LanguagesFile returns the user's languages.toml path
func LoadThemeTOML ¶
LoadThemeTOML reads an embedded theme, resolving its inherits chain
func QueryWorkspaceTrust ¶
QueryWorkspaceTrust reports whether dir's workspace may run its own config and init files. Insecure trusts everything
func TrustWorkspace ¶
TrustWorkspace adds the workspace containing dir to the trusted list
func UntrustWorkspace ¶
UntrustWorkspace drops the workspace containing dir from the trusted list
func WorkspaceConfigFile ¶
WorkspaceConfigFile returns the workspace config.toml path under dir
func WorkspaceInitFile ¶ added in v0.1.31
WorkspaceInitFile returns the workspace Ale initialization path
func WorkspaceLanguagesFile ¶
WorkspaceLanguagesFile returns the workspace languages.toml path under dir
func WorkspaceTrustFile ¶
WorkspaceTrustFile returns the path of the trusted-workspace list
Types ¶
type WorkspaceFiles ¶ added in v0.2.0
WorkspaceFiles names a global settings file and the workspace file merged over it, alongside the directory whose trust governs that merge