This PR fixes the release script to remove the `tinymist-analysis` crate
from the release process.
This PR also fixes the `crityp` crate to include the `system` feature in
the `cli` feature.
This PR adds comprehensive documentation for all public items in
`crates/tinymist-query/src/syntax/expr.rs` following Rust documentation
conventions.
## Changes Made
The following public items now have proper documentation comments:
- **`ExprRoute`** type alias - Documents its purpose as a mapping
structure for file identifiers to lexical scopes during expression
analysis routing
- **`expr_of`** function - Describes its role in analyzing expressions
within source files and producing expression information including
resolves, imports, docstrings, and lexical scoping data
- **`ExprWorker`** struct - Explains its functionality as a worker for
processing expressions during source file analysis, handling expression
checking, scope management, symbol resolution, and docstring collection
## Documentation Style
All documentation follows Rust conventions by:
- Using third person singular verbs
- Focusing on the purpose and functionality rather than implementation
details
- Providing clear, concise descriptions of what each item does
The code has been formatted with `cargo fmt` and compiles successfully
after the changes.
Fixes#2048.
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
This PR adds comprehensive documentation comments to all public items in
`crates/tinymist-analysis/src/syntax/def.rs`. The file contained
numerous public structs, enums, functions, and fields that lacked
documentation, making it difficult for contributors to understand the
purpose and usage of these types in the syntax analysis system.
## Changes Made
- **Public Types**: Added documentation to 40+ public types including
core expression types (`ExprInfo`, `ExprInfoRepr`, `Expr`), declaration
types (`Decl`, `DefKind`), and expression-specific structs
- **Public Functions**: Added documentation to 60+ public functions
including:
- Constructor methods for all declaration types (`Decl::func`,
`Decl::var`, etc.)
- Utility methods across all major types (`get_def`, `is_exported`,
`span`, etc.)
- Expression and operation constructors (`SelectExpr::new`,
`UnInst::new`, etc.)
- **Public Fields**: Added documentation to all public fields in 35+
structs, explaining their purpose and usage context
- **Type Aliases**: Documented utility types like `LexicalScope`,
`DeclExpr`, `ExportMap`
All documentation follows the existing codebase style using triple-slash
comments (`///`) and focuses on explaining the purpose, usage context,
and behavior of each item within the syntax analysis pipeline.
## Verification
- Code formatting applied using `cargo fmt`
- No functional changes made - purely documentation additions
- All public API items in the file now have appropriate documentation
This significantly improves the developer experience for anyone working
with the syntax analysis components of tinymist.
Fixes#2023.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/Myriad-Dreamin/tinymist/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
using clippy 0.1.91 (898aff704d 2025-08-14), but some warnings already
exist in the latest stable version
mostly about elided lifetime and if-chain
only remaining warnings:
```
warning: struct `HashRepr` is never constructed
--> crates\tinymist-query\src\tests.rs:462:12
|
462 | pub struct HashRepr<T>(pub T);
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: a method with this name may be added to the standard library in the future
--> crates\tinymist\src\actor\editor.rs:103:30
|
103 | ... .map_or_default(|fid| unix_slash(fid.vpath().as_rooted_path()));
| ^^^^^^^^^^^^^^
|
= warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior!
= note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
= help: call with fully qualified syntax `typst::typst_utils::OptionExt::map_or_default(...)` to keep using the current method
= note: `#[warn(unstable_name_collisions)]` on by default
help: add `#![feature(result_option_map_or_default)]` to the crate attributes to enable `std::option::Option::<T>::map_or_default`
--> crates\tinymist\src\lib.rs:3:1
|
3 + #![feature(result_option_map_or_default)]
|
```
It provides a `package-doc.json` and HTML is rendered using a
`package-doc` function.
```typ
#let package-doc(info, path: none) [
#metadata((
// more sub paths
)) <static-paths>
#render-page(info, path) // the content of $path/.html
]
#package-doc(json("package-doc.json"))
```
When `f` is a scope with at least one member:
- completes `#f` as `#f()` if `f` will never be a type or element
(merely a function).
- Otherwise, completes `#f` as `#f` and adds a variant `#f.paren`
completed as `#f(|)` or `#f()|`
This excepts for the following cases:
- When the surrounding syntax doesn't like parentheses (for example,
function fields)
> Complete the field name along with its value. Notes:
> No parentheses since function fields cannot currently be called
> with method syntax;
- When the surrounding syntax requires parentheses, for example set
rules, e.g. `#set r|` is completed as `#set raw(|)`.
When passing configuration items with null values, the default
configurations are used. Note: I don't ensure this to be always true,
some configuration items may have different non-default behaviors when
accepting a null value now or in future. The `deserialize_null_default`
is taken from https://github.com/serde-rs/serde/issues/1098.
Configuration parsing changes:
+ some configurations only accepting boolean now coerce null to `false`
(default).
+ some configurations only accepting an object now coerce null to
default.
+ The `tinymist.preview.invertColors` now now coerces null to `"never"`
(default).