Commit graph

1026 commits

Author SHA1 Message Date
Myriad-Dreamin
2fc5d919e9
build: bump version to 0.13.24 (#2085)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
+tag v0.13.24
2025-08-26 16:15:03 +08:00
Myriad-Dreamin
856a1e4485
revert: "feat: rename labels (#1858)" (#2084)
This reverts commit 14c7a92944. Didn't
pass the test `label_indir.typ.snap`.
2025-08-26 14:07:42 +08:00
Myriad-Dreamin
2cbf081408
fix: handle list should be camelCase (#2083)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-26 10:37:19 +08:00
Myriad-Dreamin
468e993649
build: bump version to 0.13.24-rc3 (#2080)
+tag v0.13.24-rc3
2025-08-25 10:44:49 +08:00
Myriad-Dreamin
9a8476ecfb
build: bump version to 0.13.24-rc2 (#2077)
+tag v0.13.24-rc2
2025-08-25 06:16:18 +08:00
Myriad-Dreamin
e584beb926
fix: update cargo metadata and crate release script (#2073)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
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.
2025-08-25 03:03:55 +08:00
Myriad-Dreamin
b7845cb785
build: bump world crates to 0.13.24-rc1 (#2047) 2025-08-24 23:22:06 +08:00
Myriad-Dreamin
d85717f81e
feat: init log in web (#2068) 2025-08-24 08:45:51 +08:00
Myriad-Dreamin
5ee01b59a9
refactor: create main files (#2054) 2025-08-24 06:12:11 +08:00
Myriad-Dreamin
532f25abe9
docs: document all public items in rust codebase (#2058)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
2025-08-21 12:50:03 +08:00
Copilot
4ce0a59862
docs: Add documentation for pub items in expr.rs (#2051)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
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>
2025-08-20 12:27:43 +08:00
Copilot
dc233fe436
docs: add comprehensive documentation to all public items in syntax/def.rs (#2024)
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>
2025-08-20 11:47:33 +08:00
Myriad-Dreamin
f964d9d91a
build: bump version to 0.13.24-rc1 (#2043)
+tag v0.13.24-rc1
2025-08-19 11:56:46 +08:00
Myriad-Dreamin
05280aec4d
feat: bump edition of most crates to rust 2024 (#2042)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-18 16:48:41 +08:00
Myriad-Dreamin
d227ad2a53
feat: schedule async tasks when running the server on bare-metals (#2040) 2025-08-18 15:00:04 +08:00
Myriad-Dreamin
310c911996
feat: fix build:web and add watch:web command (#2041) 2025-08-18 14:31:02 +08:00
QuadnucYard
3a51577b28
fix: eliminate clippy warnings (#2036)
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)]
    |
```
2025-08-18 12:42:03 +08:00
QuadnucYard
c73e7f5863
feat: add range formatting support to the language server (#1984)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-08-18 07:54:34 +08:00
Myriad-Dreamin
98062430b4
docs: update commands to install tinymist cli (#2037)
closes #2033
2025-08-18 07:17:33 +08:00
Myriad-Dreamin
bf081ec347
feat: export package docs to json format and render to html (#1809)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
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"))
```
2025-08-13 12:12:08 +08:00
Myriad-Dreamin
2c552ce985
feat: make enter feature in list or enum work (#2022)
Continue work on Myriad-Dreamin/tinymist#1446
2025-08-13 11:15:31 +08:00
Myriad-Dreamin
a561059a4e
feat: add js transport to sync-ls (#2029)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-12 06:07:23 +08:00
Myriad-Dreamin
5613bd29be
fix: rename tinymist-cli artifacts back to tinymist (#2030)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / build (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-12 05:29:03 +08:00
Myriad-Dreamin
f7f2760520
feat: use tinymist_std::time for wasm32 targets (#2028)
`std::time` are not implemented for wasm32 targets, so we should use the
time crate made by ourselves.
2025-08-12 04:40:04 +08:00
Myriad-Dreamin
ce5ab81760
feat: move and compile tinymist crate for wasm32 target (#2027)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-11 13:14:26 +08:00
Myriad-Dreamin
79f68dc94d
feat: compile tinymist-query for wasm32 target (#1947)
- #2025 
- #2026

---------

Co-authored-by: Momijiichigo <ichigomomiji436@gmail.com>
2025-08-11 09:35:07 +08:00
Myriad-Dreamin
b102b42d2c
feat: compile diag crate for wasm32 target (#2026) 2025-08-11 08:49:37 +08:00
Myriad-Dreamin
8431f386ce
feat: compile lock crate for wasm32 target (#2025) 2025-08-11 08:17:20 +08:00
Hong Jiarong
7a9e1cfb3c
fix: clean typlite markers from doc strings (#2017)
When there's HTML comments in list, the markdown syntax won't be parsed
as expected. This pr cleans typlite markers from doc string to avoid
this behavior.

<img width="654" height="223" alt="bfedf840bc92a34c44212006232a7e17"
src="https://github.com/user-attachments/assets/9015952b-a5de-4d59-a8ff-61a5e3d09d1b"
/>
<img width="641" height="257" alt="0267db904824cf09b67234bdcb0919e7"
src="https://github.com/user-attachments/assets/938fabaa-d6fe-42d4-adca-6c96b59443e2"
/>
2025-08-11 07:03:53 +08:00
Myriad-Dreamin
14c7a92944
feat: rename labels (#1858)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
closes #549
2025-08-09 19:54:22 +08:00
Myriad-Dreamin
a732861f67
feat: completes both #f and #f.paren in some cases (#1940) (#2014)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
Reverts Myriad-Dreamin/tinymist#2003
2025-08-08 01:19:16 +08:00
Myriad-Dreamin
039d911d1e
dev: enable logs in route.rs (#2015) 2025-08-08 00:53:28 +08:00
Myriad-Dreamin
c3fa0c5cb2
fix: ensure that the lockfile is respected (#2000) 2025-08-07 07:42:02 +08:00
Myriad-Dreamin
bd688f354e
build: bump version to 0.13.22 (#2008)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / announce (push) Blocked by required conditions
tinymist::ci / build (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
+tag v0.13.22
2025-08-07 00:37:19 +08:00
Myriad-Dreamin
a0d0b17206
build: bump version to 0.13.22-rc2 (#2007)
+tag v0.13.22-rc2
2025-08-06 22:19:32 +08:00
Myriad-Dreamin
7455d11629
fix: emit save events to cover issue of notify (#2006) 2025-08-06 21:15:56 +08:00
Myriad-Dreamin
58b43c006c
fix: don't check or change state if no reasons (#2005)
Otherwise, `pending_reasons` is cleared.
2025-08-06 20:12:56 +08:00
Myriad-Dreamin
920a318df4
build: upgrade tinymist-{derive,l10n,package,std}, typst-shim edition… (#1995)
… to 2024
2025-08-06 14:01:01 +08:00
Myriad-Dreamin
46e7eca2b4
revert: "feat: completes both #f and #f.paren in some cases (#1940)" (#2003)
Reverts Myriad-Dreamin/tinymist#1940. Hasn't released v0.13.22, will be
merged again after release.
2025-08-06 13:59:04 +08:00
Myriad-Dreamin
8898a2a45f
feat: completes both #f and #f.paren in some cases (#1940)
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(|)`.
2025-08-06 13:37:39 +08:00
Myriad-Dreamin
858831993d
build: bump version to 0.13.22-rc1 (#2002)
+tag v0.13.22-rc1
2025-08-06 11:42:30 +08:00
Myriad-Dreamin
bc09736cc6
fix: always send compiled interrupt to main thread (#2001)
We have to always inform the main thread about the compilation. If such
interrupt is not sent, the main thread will be stalled forever.
2025-08-06 10:30:56 +08:00
Myriad-Dreamin
451a10869a
build: bump msrv to 1.88 (#1993)
Co-authored-by: paran3xus <paran3xus007@gmail.com>
2025-08-05 23:18:16 +08:00
Myriad-Dreamin
ce43c4bbd9
build: bump version to 0.13.20 (#1999)
+tag v0.13.20
2025-08-05 22:53:53 +08:00
Myriad-Dreamin
615f834822
build: bump version to 0.13.20-rc1 (#1989)
+tag v0.13.20-rc1
2025-08-05 12:12:11 +08:00
Myriad-Dreamin
d7fa34f2fe
fix: ignore outdated signal (#1991) 2025-08-05 11:04:07 +08:00
Myriad-Dreamin
a2f8928066
fix: clean up signal when revision is updated (#1990)
Forgot to clean up signal when evision is updated

```
// The signal must be reset to the current one.
*n_signal = art.snap.signal;
```
2025-08-05 10:53:23 +08:00
Myriad-Dreamin
fb1c8b3b35
feat: make configuration items null-safe (#1988)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
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).
2025-08-05 10:31:52 +08:00
Myriad-Dreamin
24f4900025
build: bump version to 0.13.18 (#1980)
+tag v0.13.18
2025-08-04 03:25:40 +08:00
Myriad-Dreamin
700745e46e
build: bump version to 0.13.18-rc2 (#1975) 2025-08-03 14:04:21 +08:00