class
Crycco::CtagsManager
- Crycco::CtagsManager
- Reference
- Object
Defined in:
ctags.crConstructors
-
.instance(files : Array(Path), ctags_path : String) : CtagsManager
Get singleton instance
- .new(files : Array(Path), ctags_path : String)
Class Method Summary
-
.reset
Reset singleton (useful for testing)
Instance Method Summary
-
#generate_tags : Bool
Generate ctags for all files
-
#resolve_symbol(symbol_name : String, current_file : Path) : Tuple(Path, Int32) | Nil
Symbol Resolution
Constructor Detail
Class Method Detail
Instance Method Detail
def generate_tags : Bool
#
Generate ctags for all files
This method generates ctags for the provided files using the appropriate tools for each language type. For Crystal files, it uses crystal-ctags. For other files, it uses universal ctags if available.
def resolve_symbol(symbol_name : String, current_file : Path) : Tuple(Path, Int32) | Nil
#
Symbol Resolution
Resolve a symbol name to its definition location. Returns a tuple of (file_path, line_number) if found, or nil if not found.
The resolution follows this priority:
- Symbols in the current file
- Unique symbols across all files
- Nil if ambiguous or not found