Skip to main content

Module references

Module references 

Source

Enums§

SymbolKind
What kind of symbol the cursor is on. Used to dispatch to the appropriate semantic walker so that, e.g., searching for get as a method doesn’t return free-function calls named get.

Functions§

find_constructor_references
Find only new ClassName(...) instantiation sites across all docs.
find_references
Find all locations where word is referenced across the given documents. If include_declaration is true, also includes the declaration site. Pass kind to restrict results to a particular symbol category; None falls back to the original word-based walker (better some results than none).
find_references_codebase
Fast path: look up pre-computed reference locations from the mir codebase index.
find_references_codebase_with_target
Like find_references_codebase but accepts an exact FQN (for Function/Class) or owning FQCN (for Method) to avoid short-name collisions across namespaces and unrelated classes. When target_fqn is None, behaves identically to find_references_codebase.
find_references_with_target
Like find_references but narrows scanning to docs whose namespace + use imports would resolve word to target_fqn. Used by textDocument/references for the AST fallback so it doesn’t match same-short-name symbols in unrelated namespaces.
find_references_with_use
Like find_references but also includes use statement spans. Used by rename so that use Foo; statements are also updated. Always uses the general walker (rename must update all occurrence kinds).

Type Aliases§

RefLookup
Callback signature for the mir-codebase reference-lookup fast path: (key) -> Vec<(file_uri, start_byte, end_byte)>.