Skip to main content

ImportOverlay

Type Alias ImportOverlay 

Source
pub type ImportOverlay = Arc<dyn Fn(&Path) -> Option<String> + Send + Sync>;
Expand description

Hook that, given an absolute (or workspace-relative) file path, may return overriding source text for that file.

CLI callers leave this as None and the closure walker reads from disk. The LSP can supply an overlay backed by its open-buffer cache so that @import resolution sees in-flight edits, not stale disk contents.

Aliased Typeยง

pub struct ImportOverlay { /* private fields */ }