f5c244dbb1
KCL: stdlib macro should now assume all functions use keywords ( #7158 )
...
This has been enforced by the parser since #6639 , so there's no need for `keywords = true` in every stdlib function anymore.
2025-05-21 21:10:40 +00:00
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
ab63345c57
Run std lib example tests one at a time ( #7127 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-21 05:20:36 +00:00
33e83747f3
Split up example tests into smaller batches and provide info on which example is failing ( #6896 )
...
* Give example info for failing std example tests
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Shard example tests into 10
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-13 10:50:54 -07:00
9c52f5b19a
Add tags to Rust std lib functions ( #6701 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-06 14:14:11 +12:00
16f5d9c284
Docs improvements ( #6615 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-01 08:56:27 -07:00
83a87b046f
Declare std::offsetPlane in KCL ( #6344 )
...
* Declare std::offsetPlane in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Use two axes to define planes in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-24 22:01:27 +12:00
be05dd7ba1
More propagation of numeric types ( #6177 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-07 19:02:41 +12:00
73694563cf
change TyF64 to f64 according to JsonSchema and cleanup docs code ( #6081 )
...
* cleanup gen_std
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cleanup docs
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix table
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2025-04-01 01:02:48 +00:00
efc8c82d8b
BREAKING: KCL @settings are the source of truth for units ( #5808 )
2025-03-31 10:56:03 -04:00
3f02bb2065
deterministic id generator per module ( #5811 )
...
* deterministic id generator per module
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* non
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* do not remake the planes if they are alreaady made;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* do not remake the planes if they are alreaady made;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2025-03-15 17:08:39 +00:00
bc3a0e3896
more updates for kcl-samples ( #5696 )
...
* screenshots and step
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* automations
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* add manifest generation
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* small refactor
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* update readme
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* write the readme
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes for comments
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* derive-docs tests updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* update all the generated artifact commands, since we dont need to clear scene at the start of run so we dont need to recreate all the planes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2025-03-07 18:45:33 -08:00
df278c7e6a
Various hover improvements ( #5617 )
...
* Show more info on hover for variables
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Move hover impls to lsp module
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Test the new hovers; fix signature syntax
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Hover tips for kwargs
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-03-04 09:53:31 +00:00
c3bdc6f106
Move the wasm lib, and cleanup rust directory and all references ( #5585 )
...
* git mv src/wasm-lib rust
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv wasm-lib to workspace
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv kcl-lib
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv derive docs
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* resolve file paths
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* move more shit
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix more paths
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make yarn build:wasm work
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix scripts
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* better references
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix cargo ci
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix reference
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix more ci
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cargo sort
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix script
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix a dep
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* sort
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* remove unused deps
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* Revert "remove unused deps"
This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972.
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* deps;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2025-03-01 21:59:01 +00:00