@shd101wyy/yo 0.1.14 → 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.
- package/README.md +40 -1
- package/out/cjs/index.cjs +514 -514
- package/out/cjs/yo-cli.cjs +713 -687
- package/out/cjs/yo-lsp.cjs +11635 -0
- package/out/esm/index.mjs +359 -359
- package/out/types/src/cache.d.ts +2 -0
- package/out/types/src/doc/extractor.d.ts +4 -0
- package/out/types/src/evaluator/values/impl.d.ts +9 -1
- package/out/types/src/lsp/completion.d.ts +3 -0
- package/out/types/src/lsp/definition.d.ts +3 -0
- package/out/types/src/lsp/diagnostics.d.ts +6 -0
- package/out/types/src/lsp/document-manager.d.ts +31 -0
- package/out/types/src/lsp/folding.d.ts +3 -0
- package/out/types/src/lsp/hover.d.ts +3 -0
- package/out/types/src/lsp/inlay-hints.d.ts +3 -0
- package/out/types/src/lsp/references.d.ts +3 -0
- package/out/types/src/lsp/rename.d.ts +16 -0
- package/out/types/src/lsp/server.d.ts +1 -0
- package/out/types/src/lsp/signature-help.d.ts +3 -0
- package/out/types/src/lsp/symbols.d.ts +3 -0
- package/out/types/src/lsp/utils.d.ts +11 -0
- package/out/types/src/tests/lsp.test.d.ts +1 -0
- package/out/types/src/tests/version.test.d.ts +1 -0
- package/out/types/src/types/definitions.d.ts +2 -0
- package/out/types/src/version-cache.d.ts +7 -0
- package/out/types/src/version.d.ts +5 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/scripts/build-site.ts +32 -15
- package/scripts/check-liburing.js +2 -2
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)
|
|
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.
|