Hecr::LSP::Index
Workspace component index: contract directives in .hecr files and plain defs in .cr files.
Constants
DEF_LINE = /^\s*(?:private\s+|protected\s+)?def\s+(?:self\.)?([a-z_][a-zA-Z0-9_]*[?!]?)/
DIRECTIVE = /\A\s*(?:<%!--(?<doc>.*?)--%>\s*)?<%@\s*(?<head>def\s.*?)\s*%>/m
MAX_INDEX_FILE_SIZE = 1024 * 1024
Components live in ordinary source files; skip anything larger so a
vendored bundle or generated data file named .cr/.hecr can't make
every index rebuild read it into memory.