Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSymbols ¶
func SearchSymbolFiles ¶
func SearchSymbolFiles(idx *SymbolIndex, tokens []string) []FileSymbols
SearchSymbolFiles returns files whose symbols match any of the provided tokens (case-insensitive). For each matching file, only the matching symbols are included. Returns empty slice (not nil) if no matches.
type SymbolIndex ¶
type SymbolIndex struct {
Files []FileSymbols `json:"files"`
}
func BuildSymbols ¶
func BuildSymbols(root string) (*SymbolIndex, error)
BuildSymbols scans the workspace root for source files and extracts symbols using tree-sitter AST for supported languages (Go, Python, TypeScript, JavaScript) with regex fallback for others. Results are sorted by file path and then by line number within each file.
func LoadSymbols ¶
func LoadSymbols(root string) (*SymbolIndex, error)
LoadSymbols reads the cached symbol index from {root}/.sprout/symbols.json. Returns nil, nil if the cache file doesn't exist.
Click to show internal directories.
Click to hide internal directories.