Files
modeling-app/docs/kcl-std
Adam Chalmers 0ea1e9a6da KCL: Customizable per-arg and per-fn snippet values (#7156)
Before, the LSP snippet for `startProfile` was 

```
startProfile(%, at = [3.14, 3.14])
```

Now it's 

```
startProfile(%, at = [0, 0])
```

This is configured by adding a `snippet_value=` field to the stdlib macro. For example:


```diff
#[stdlib {
    name = "startProfile",
    keywords = true,
    unlabeled_first = true,
    args = {
        sketch_surface = { docs = "What to start the profile on" },
-       at = { docs = "Where to start the profile. An absolute point." },
+       at = { docs = "Where to start the profile. An absolute point.", snippet_value = "[0, 0]" },        tag = { docs = "Tag this first starting point" },
    },
    tags = ["sketch"]
}]
```

## Work for follow-up PRs

 - Make this work for KCL functions defined in KCL, e.g. [`fn circle`](36c8ad439d/rust/kcl-lib/std/sketch.kcl (L31-L32)) -- something like `@(snippet_value = "[0, 0]")` perhaps
 - Go through the stdlib and change defaults where appropriate
2025-05-21 20:18:20 +00:00
..
2025-05-13 14:59:23 +12:00
2025-05-13 19:27:34 +00:00
2025-05-06 11:02:55 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-06 11:02:55 +12:00
2025-05-19 22:11:35 +00:00
2025-05-13 19:27:34 +00:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-11 19:32:33 +12:00
2025-05-13 19:27:34 +00:00

Autogenerated docs

Everything in this directory and its subdirectories (except this file) is automatically generated. Do not edit anything in this directory directly, your changes will be lost.

The directory contents are generated by running the test_generate_stdlib_markdown_docs test in /rust/kcl-lib/src/docs/gen_std_tests.rs. Files are generated from the standard library declared in KCL (/rust/kcl-lib/std) and in Rust (/rust/kcl-lib/src/std), and by copying files from ../kcl-src.