@shd101wyy/yo 0.1.13 → 0.1.15

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 (42) hide show
  1. package/README.md +40 -1
  2. package/out/cjs/index.cjs +514 -514
  3. package/out/cjs/yo-cli.cjs +809 -686
  4. package/out/cjs/yo-lsp.cjs +11635 -0
  5. package/out/esm/index.mjs +359 -359
  6. package/out/types/src/cache.d.ts +2 -0
  7. package/out/types/src/doc/extractor.d.ts +4 -0
  8. package/out/types/src/doc/render-html.d.ts +5 -1
  9. package/out/types/src/evaluator/values/impl.d.ts +9 -1
  10. package/out/types/src/lsp/completion.d.ts +3 -0
  11. package/out/types/src/lsp/definition.d.ts +3 -0
  12. package/out/types/src/lsp/diagnostics.d.ts +6 -0
  13. package/out/types/src/lsp/document-manager.d.ts +31 -0
  14. package/out/types/src/lsp/folding.d.ts +3 -0
  15. package/out/types/src/lsp/hover.d.ts +3 -0
  16. package/out/types/src/lsp/inlay-hints.d.ts +3 -0
  17. package/out/types/src/lsp/references.d.ts +3 -0
  18. package/out/types/src/lsp/rename.d.ts +16 -0
  19. package/out/types/src/lsp/server.d.ts +1 -0
  20. package/out/types/src/lsp/signature-help.d.ts +3 -0
  21. package/out/types/src/lsp/symbols.d.ts +3 -0
  22. package/out/types/src/lsp/utils.d.ts +11 -0
  23. package/out/types/src/tests/lsp.test.d.ts +1 -0
  24. package/out/types/src/tests/version.test.d.ts +1 -0
  25. package/out/types/src/types/definitions.d.ts +2 -0
  26. package/out/types/src/version-cache.d.ts +7 -0
  27. package/out/types/src/version.d.ts +5 -0
  28. package/out/types/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +3 -1
  30. package/scripts/build-site.ts +69 -15
  31. package/scripts/check-liburing.js +2 -2
  32. package/std/build.yo +8 -4
  33. package/std/encoding/base64.yo +7 -4
  34. package/std/encoding/hex.yo +7 -4
  35. package/std/encoding/html.yo +7 -4
  36. package/std/encoding/json.yo +9 -6
  37. package/std/encoding/punycode.yo +9 -6
  38. package/std/encoding/toml.yo +7 -4
  39. package/std/encoding/utf16.yo +7 -4
  40. package/std/fs/dir.yo +16 -13
  41. package/std/fs/file.yo +19 -16
  42. package/std/http/client.yo +12 -6
package/README.md CHANGED
@@ -318,11 +318,50 @@ $ ./yo-cli compile src/tests/examples/fixme.yo
318
318
 
319
319
  ## Editor Support
320
320
 
321
- - A VS Code extension is available [here](https://marketplace.visualstudio.com/items?itemName=shd101wyy.yolang) that supports basic syntax highlighting. No LSP yet.
321
+ - A VS Code extension is available [here](https://marketplace.visualstudio.com/items?itemName=shd101wyy.yolang) with built-in **Language Server Protocol (LSP)** support, providing:
322
+
323
+ - **Hover information** — types, values, and doc comments for any identifier
324
+ - **Auto-completion** — struct fields, enum variants, module members, impl methods, keywords
325
+ - **Go to definition** — jump to any symbol's definition
326
+ - **Find references** — locate all usages of a symbol
327
+ - **Rename symbol** — rename across all references
328
+ - **Document symbols** — outline view of top-level declarations
329
+ - **Signature help** — parameter hints while typing function calls
330
+ - **Diagnostics** — real-time error reporting
331
+ - **Code folding** — collapse function bodies, structs, impl blocks
332
+
333
+ The LSP server can also be used with other editors via stdio JSON-RPC:
334
+
335
+ ```bash
336
+ node out/cjs/yo-lsp.cjs --stdio
337
+ ```
338
+
339
+ See [docs/en-US/LSP.md](./docs/en-US/LSP.md) for full documentation.
322
340
 
323
341
  - Vim / Neovim: a minimal syntax file and a usage README are available in `vscode-extension/syntaxes/`.
324
342
  See [vscode-extension/syntaxes/README.md](./vscode-extension/syntaxes/README.md) for installation steps, `ftdetect` examples and `home-manager` snippets.
325
343
 
344
+ ## Version Management
345
+
346
+ Yo supports per-project version pinning via a `.yo-version` file (similar to `.nvmrc` or `.python-version`):
347
+
348
+ ```bash
349
+ # Pin your project to a specific Yo version
350
+ yo version pin 0.1.12
351
+
352
+ # Show current and pinned version
353
+ yo version
354
+
355
+ # Install, list, and clean cached versions
356
+ yo version install 0.1.13
357
+ yo version list
358
+ yo version clean
359
+ ```
360
+
361
+ 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.
362
+
363
+ See [docs/en-US/VERSION_MANAGEMENT.md](./docs/en-US/VERSION_MANAGEMENT.md) for full documentation.
364
+
326
365
  ## AI Agent Skills
327
366
 
328
367
  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.