Function racer::snippet_for_match
[−]
[src]
pub fn snippet_for_match(m: &Match, session: &Session) -> String
Returns completion snippets usable by some editors
Generates a snippet string given a Match
. The provided snippet contains
substrings like "${1:name}" which some editors can use to quickly fill in
arguments.
Examples
extern crate racer; use std::path::Path; let path = Path::new("."); let cache = racer::FileCache::default(); let session = racer::Session::new(&cache); let m = racer::complete_fully_qualified_name( "std::fs::canonicalize", &path, &session ).next().unwrap(); let snip = racer::snippet_for_match(&m, &session); assert_eq!(snip, "canonicalize(${1:path})");