Skip to content

v0.1.1 - Fix hover, definition, and references

Choose a tag to compare

@jsvitolo jsvitolo released this 18 Feb 00:34
· 12 commits to main since this release

Fixes

  • SQL NULL comparison bug in find_symbol and find_refs: NULL = NULL always evaluates to false in SQLite, breaking module lookups and module-wide reference searches
  • Hover on definitions: hovering over a function definition (e.g., def open) now correctly shows type info instead of returning null
  • Definition on definitions: go-to-definition on a function definition correctly resolves to itself
  • References on definitions: find-references on a function definition now correctly finds all call sites by falling back to the symbol table when the ref table has only compiler-internal entries (like Kernel.def/2)
  • References for modules: module-wide reference searches now work when name is nil (SQL NULL fix in find_refs)

Technical Details

  • Added find_symbol_at fallback in :function_name and :identifier branches for hover, definition, and references handlers
  • Fixed SQL WHERE clauses: WHERE module = ?1 → WHERE (module = ?1 OR (?1 IS NULL AND kind = 'module')) and target_name = ?2 → (?2 IS NULL OR target_name = ?2)
  • Extracted resolve_hover_from_ref_or_symbol helper for cleaner fallback cascade