class Crycco::CtagsManager

Defined in:

ctags.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.instance(files : Array(Path), ctags_path : String) : CtagsManager #

Get singleton instance


[View source]
def self.new(files : Array(Path), ctags_path : String) #

[View source]

Class Method Detail

def self.reset #

Reset singleton (useful for testing)


[View source]

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.


[View source]
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:

  1. Symbols in the current file
  2. Unique symbols across all files
  3. Nil if ambiguous or not found

[View source]