Documentation
¶
Index ¶
- Constants
- func CachedWorktrees() int
- func ClearWorkspaceCache()
- func FindGitWorktree(start string) string
- func IsInsideWorkspace(path, workspaceRoot string) bool
- func IsTrustedWorkspace(root string, trustedRoots []string, operatorRoots map[string]bool) bool
- func NearestRoot(start string, markers, excludes []string, ceiling string) string
- func NormalizePath(path string) string
- func OperatorWorkspaceRoots(anchors []func() (string, error)) map[string]bool
- func PathList(v any) ([]string, bool)
- func ResolveWorkspaceForFile(filePath, cwd string) (string, bool)
- func TrustedWorkspaces(value any) ([]string, bool)
Constants ¶
const (
WorktreeCacheCap = 512
)
Variables ¶
This section is empty.
Functions ¶
func CachedWorktrees ¶
func CachedWorktrees() int
CachedWorktrees counts the worktree resolutions held in the cache
func ClearWorkspaceCache ¶
func ClearWorkspaceCache()
ClearWorkspaceCache forgets every cached worktree resolution
func FindGitWorktree ¶
FindGitWorktree returns the nearest ancestor holding a .git file or directory, empty when none
func IsInsideWorkspace ¶
IsInsideWorkspace reports whether a path is the workspace root or lies under it, symlinks unresolved
func IsTrustedWorkspace ¶
IsTrustedWorkspace reports whether a root lies in a trusted directory or belongs to an operator worktree
func NearestRoot ¶
NearestRoot walks up for the first directory holding a marker, empty past the ceiling or after an exclude hit
func NormalizePath ¶
NormalizePath expands a leading tilde and makes the path absolute and clean without resolving symlinks
func OperatorWorkspaceRoots ¶
OperatorWorkspaceRoots maps each anchor to its git worktree, skipping failed anchors and repos at or above home
func PathList ¶
PathList reads a config list of paths with the tilde expanded, false when not a list of strings
func ResolveWorkspaceForFile ¶
ResolveWorkspaceForFile picks the cwd worktree when the file lies in it, else the file's own worktree
func TrustedWorkspaces ¶
TrustedWorkspaces reads lsp.trusted_workspaces as directories, false when the value is malformed
Types ¶
This section is empty.