@shd101wyy/yo 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +43 -1
  2. package/out/cjs/index.cjs +581 -601
  3. package/out/cjs/yo-cli.cjs +739 -733
  4. package/out/cjs/yo-lsp.cjs +11615 -0
  5. package/out/esm/index.mjs +530 -550
  6. package/out/types/src/cache.d.ts +2 -0
  7. package/out/types/src/codegen/exprs/return.d.ts +1 -1
  8. package/out/types/src/codegen/types/generation.d.ts +0 -2
  9. package/out/types/src/codegen/utils/index.d.ts +2 -8
  10. package/out/types/src/doc/extractor.d.ts +4 -0
  11. package/out/types/src/evaluator/builtins/rc-fns.d.ts +0 -5
  12. package/out/types/src/evaluator/context.d.ts +7 -3
  13. package/out/types/src/evaluator/trait-checking.d.ts +2 -0
  14. package/out/types/src/evaluator/types/object.d.ts +2 -1
  15. package/out/types/src/evaluator/types/struct.d.ts +2 -1
  16. package/out/types/src/evaluator/types/utils.d.ts +3 -8
  17. package/out/types/src/evaluator/values/impl.d.ts +9 -1
  18. package/out/types/src/expr.d.ts +1 -2
  19. package/out/types/src/function-value.d.ts +1 -0
  20. package/out/types/src/lsp/completion.d.ts +3 -0
  21. package/out/types/src/lsp/definition.d.ts +3 -0
  22. package/out/types/src/lsp/diagnostics.d.ts +6 -0
  23. package/out/types/src/lsp/document-manager.d.ts +31 -0
  24. package/out/types/src/lsp/folding.d.ts +3 -0
  25. package/out/types/src/lsp/hover.d.ts +3 -0
  26. package/out/types/src/lsp/inlay-hints.d.ts +3 -0
  27. package/out/types/src/lsp/references.d.ts +3 -0
  28. package/out/types/src/lsp/rename.d.ts +16 -0
  29. package/out/types/src/lsp/server.d.ts +1 -0
  30. package/out/types/src/lsp/signature-help.d.ts +3 -0
  31. package/out/types/src/lsp/symbols.d.ts +3 -0
  32. package/out/types/src/lsp/utils.d.ts +11 -0
  33. package/out/types/src/tests/lsp.test.d.ts +1 -0
  34. package/out/types/src/tests/version.test.d.ts +1 -0
  35. package/out/types/src/types/creators.d.ts +2 -3
  36. package/out/types/src/types/definitions.d.ts +3 -6
  37. package/out/types/src/types/guards.d.ts +5 -2
  38. package/out/types/src/types/tags.d.ts +0 -1
  39. package/out/types/src/version-cache.d.ts +7 -0
  40. package/out/types/src/version.d.ts +5 -0
  41. package/out/types/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +3 -1
  43. package/scripts/build-site.ts +32 -15
  44. package/scripts/check-liburing.js +2 -2
  45. package/std/imm/list.yo +254 -0
  46. package/std/imm/map.yo +917 -0
  47. package/std/imm/set.yo +179 -0
  48. package/std/imm/sorted_map.yo +595 -0
  49. package/std/imm/sorted_set.yo +202 -0
  50. package/std/imm/string.yo +667 -0
  51. package/std/imm/vec.yo +456 -0
  52. package/std/prelude.yo +22 -5
  53. package/std/sync/channel.yo +92 -44
  54. package/std/sync/cond.yo +5 -1
  55. package/std/sync/mutex.yo +5 -1
  56. package/std/sync/once.yo +2 -1
  57. package/std/sync/rwlock.yo +2 -1
  58. package/std/sync/waitgroup.yo +2 -1
  59. package/out/types/src/codegen/exprs/arc.d.ts +0 -5
  60. package/out/types/src/evaluator/calls/arc.d.ts +0 -15
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  **Work in Progress :) Not Ready!**
8
8
 
9
+ https://shd101wyy.github.io/Yo
10
+
9
11
  A multi-paradigm, general-purpose, compiled programming language.
10
12
  Yo aims to be **Simple** and **Fast** (around 0% - 15% slower than C).
11
13
 
@@ -32,6 +34,7 @@ Yo aims to be **Simple** and **Fast** (around 0% - 15% slower than C).
32
34
  - [Contributing](#contributing)
33
35
  - [Setup](#setup)
34
36
  - [Editor Support](#editor-support)
37
+ - [Version Management](#version-management)
35
38
  - [AI Agent Skills](#ai-agent-skills)
36
39
  - [Using in your own project](#using-in-your-own-project)
37
40
  - [Star History](#star-history)
@@ -318,11 +321,50 @@ $ ./yo-cli compile src/tests/examples/fixme.yo
318
321
 
319
322
  ## Editor Support
320
323
 
321
- - A VS Code extension is available [here](https://marketplace.visualstudio.com/items?itemName=shd101wyy.yolang) that supports basic syntax highlighting. No LSP yet.
324
+ - A VS Code extension is available [here](https://marketplace.visualstudio.com/items?itemName=shd101wyy.yolang) with built-in **Language Server Protocol (LSP)** support, providing:
325
+
326
+ - **Hover information** — types, values, and doc comments for any identifier
327
+ - **Auto-completion** — struct fields, enum variants, module members, impl methods, keywords
328
+ - **Go to definition** — jump to any symbol's definition
329
+ - **Find references** — locate all usages of a symbol
330
+ - **Rename symbol** — rename across all references
331
+ - **Document symbols** — outline view of top-level declarations
332
+ - **Signature help** — parameter hints while typing function calls
333
+ - **Diagnostics** — real-time error reporting
334
+ - **Code folding** — collapse function bodies, structs, impl blocks
335
+
336
+ The LSP server can also be used with other editors via stdio JSON-RPC:
337
+
338
+ ```bash
339
+ node out/cjs/yo-lsp.cjs --stdio
340
+ ```
341
+
342
+ See [docs/en-US/LSP.md](./docs/en-US/LSP.md) for full documentation.
322
343
 
323
344
  - Vim / Neovim: a minimal syntax file and a usage README are available in `vscode-extension/syntaxes/`.
324
345
  See [vscode-extension/syntaxes/README.md](./vscode-extension/syntaxes/README.md) for installation steps, `ftdetect` examples and `home-manager` snippets.
325
346
 
347
+ ## Version Management
348
+
349
+ Yo supports per-project version pinning via a `.yo-version` file (similar to `.nvmrc` or `.python-version`):
350
+
351
+ ```bash
352
+ # Pin your project to a specific Yo version
353
+ yo version pin 0.1.12
354
+
355
+ # Show current and pinned version
356
+ yo version
357
+
358
+ # Install, list, and clean cached versions
359
+ yo version install 0.1.13
360
+ yo version list
361
+ yo version clean
362
+ ```
363
+
364
+ When a `.yo-version` file exists, the `yo` CLI automatically dispatches to the pinned version — downloading and caching it on first use. The LSP server also reads `.yo-version` to resolve the correct standard library for go-to-definition and completions.
365
+
366
+ See [docs/en-US/VERSION_MANAGEMENT.md](./docs/en-US/VERSION_MANAGEMENT.md) for full documentation.
367
+
326
368
  ## AI Agent Skills
327
369
 
328
370
  This repository ships a set of **agent skill files** that teach AI agents how to write Yo programs. The skills are portable — you can copy the `.github/skills/` directory into any Yo project and agents will be able to use them there too.