KCL: Custom snippet values for kcl-in-kcl (#7163)

In #7156, I allowed KCL to set specific snippet completions for each arg of each function. They're optional -- if you don't set one, it'll fall back to the type-driven defaults.

That PR only worked for KCL stdlib functions defined in Rust. This PR enables the same feature, but for functions defined in KCL.
This commit is contained in:
Adam Chalmers
2025-05-21 22:16:04 -05:00
committed by GitHub
parent ed979d807b
commit 9c7aee32bd
3 changed files with 47 additions and 5 deletions

View File

@ -1040,8 +1040,8 @@ mod tests {
};
let snippet = circle_fn.to_autocomplete_snippet();
assert_eq!(
snippet,
r#"circle(center = [${0:3.14}, ${1:3.14}], diameter = ${2:3.14})"#
snippet, r#"circle(center = [${0:0}, ${1:0}], diameter = ${2:3.14})"#,
"actual = left, expected = right"
);
}