Commit graph

1532 commits

Author SHA1 Message Date
Myriad-Dreamin
f511aa005a
docs: add concrete usage of the lock file feature (#2011) 2025-08-07 15:47:39 +08:00
Myriad-Dreamin
5838c7d300
docs: add docs about project model (#2009)
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-07 07:42:22 +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
sjfhsjfh
39e23e18b3
fix(L10n): small fix (#1785)
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
也许可以攒到多一点一起 merge
2025-08-06 16:34:29 +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
Copilot
65ee92b1ac
fix: ensure full git history available in web and Alpine container builds (#1996)
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
The GitHub Action builds for Alpine containers (`alpine-{x64,arm64}`)
were producing warning messages that cluttered the build logs:

```
warning: tinymist-core@0.13.18: not within a suitable 'git' worktree!
warning: tinymist-core@0.13.18: VERGEN_GIT_DESCRIBE set to default
warning: tinymist-core@0.13.18: VERGEN_GIT_SHA set to default
```

These warnings occurred because the vergen crate was attempting to
access git repository information in containerized environments where
the full git history wasn't available due to shallow cloning.

**Root cause:** The Alpine workflow was using `actions/checkout@v4` with
default settings, which performs a shallow clone that doesn't include
the full git history that vergen needs for `git_describe` functionality.

**Solution:** Added `fetch-depth: 0` to the checkout step in the Alpine
workflow to ensure the full git history is available during builds. Git
is already properly installed in the Alpine environment via `apk add
--no-cache git`.

This approach maintains consistent behavior across all build
environments while eliminating the warnings in Alpine container builds.
The `tinymist --version` command continues to show proper git
information when available.

Fixes #1983.

<!-- 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-06 10:58:16 +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
Rik Huijzer
4c242c54e8
docs: make translation of pinning clearer (#1997)
Thanks for making this awesome extension. I find it very useful.

This PR suggests a small rewording for a sentence. With this, I hope it
becomes a bit clearer what the command does. This is also closer to
Google Translate's translation of "将主文件固定到当前打开的文档".
2025-08-06 09:53:47 +08:00
Myriad-Dreamin
27893b5302
revert: "fix(ci): detect create intead of push (#1962)" (#1994)
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
Reverts Myriad-Dreamin/tinymist#1962
2025-08-06 00:56:53 +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
c08b63bd3d
fix: changelog (#1992)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-05 14:18:24 +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
ParaN3xus
f33f612f43
feat: maintain workflows for nightly releases (#1986) 2025-08-05 10:27:44 +08:00
Luyan Zhou
2667fdb91b
fix: set VS Code default configuration for invertColors to "never" (#1987)
Since #1807 , VS Code pops up a warning when starting tinymist: 
<img width="464" height="162" alt="image"
src="https://github.com/user-attachments/assets/aeefac88-5515-4dcd-be52-82e402db74c5"
/>

Because the default value was not set, it's trying to deserialize a
`null`. I complete the corresponding configuration entry in the VS Code
extension's package.json and package.other.json with default value
"never".
2025-08-05 09:59:57 +08:00
Wenzhuo Liu
5c686f4641
build: bump typstyle to v0.13.17 (#1979)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-04 07:54:48 +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
959174e236
build: update cargo hash in the flake.nix (#1976)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
+tag v0.13.18-rc2
2025-08-03 15:05:16 +08:00
Myriad-Dreamin
700745e46e
build: bump version to 0.13.18-rc2 (#1975) 2025-08-03 14:04:21 +08:00
Myriad-Dreamin
1eb1828d92
fix: properly handle v-prefix in release tag to announce (#1971) 2025-08-03 10:52:15 +08:00
Myriad-Dreamin
6406870391
build: bump version to 0.13.18-rc1 (#1969)
Some checks are pending
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
2025-08-02 22:31:40 +08:00
Myriad-Dreamin
55228c76a6
feat: update links in vscode docs (#1967) 2025-08-02 21:45:58 +08:00
Myriad-Dreamin
e8e6df319a
test: add tests about workspace/symbol requests (#1966) 2025-08-02 21:45:42 +08:00
Myriad-Dreamin
ab774377f7
feat: make symbol queries infallible (#1964) 2025-08-02 20:50:14 +08:00
ParaN3xus
2ecdbd42a5
fix: use proper commit hash when generating nightly release changelog (#1965) 2025-08-02 20:39:44 +08:00
Myriad-Dreamin
9e96aefa0e
fix(ci): detect create intead of push (#1962)
According to https://github.com/actions/runner/issues/1007, the push
events was not created when bot creating tags.
2025-08-02 19:51:23 +08:00
ParaN3xus
bf30b5458a
fix: do full cargo update when releasing nightly (#1961) 2025-08-02 19:21:19 +08:00
Myriad-Dreamin
e8a72a5fe3
fix: remove some compatiblility to preview configuration and fix tinymist.preview.refresh (#1807)
Some checks failed
tinymist::auto_tag / auto-tag (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
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
`tinymist.preview.refresh` should work.
- [x] ensure that `--refresh-style` is respected
- [x] not need to pass `--refresh-style` in
extension/src/features/preview.ts
- [x] ensure configuration to work
2025-08-02 03:55:06 +08:00
ParaN3xus
cf0fb1c00d
fix: several fixes to auto release (#1959)
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
+ use `GITHUB_TOKEN` to checkout tinymist in `release-nightly.yml`.
Therefore, GitHub Actions should be granted write permission.
+ tag directives must start from the line start.
+ use the same bot name and email in actions.
2025-08-01 16:08:08 +08:00
Myriad-Dreamin
f118d81464
fix: run ci on nightly branch (#1955)
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-07-31 22:25:30 +08:00
Myriad-Dreamin
cf82fc78c2
feat: add rust and yarn to nix devShell (#1953)
by default, we assume people would like develop the language server and
editor tools. The building of tinymist-cli is moved to the neovim shell.
2025-07-31 22:22:32 +08:00
ParaN3xus
3aa9c9def0
feat: create git tag automatically to trigger releases (#1951)
This PR introduces multiple GitHub Actions to automate the release
procedure. In brief, it contains:

- **For nightly releases**: A fully automated GitHub Action that updates
dependencies (including dependencies of typstyle, typst.ts, and
typst-ansi-hl), releases nightly RC (aka canary version in the action
script) and nightly builds, along with its helper script (which can also
be useful for manually updating versions).

- **For stable releases**: Two GitHub Actions, one that detects newly
opened PRs containing tagging directives (`+Tag vx.y.z-rcw`) and leaves
comments, and another that detects merged tagging PRs and performs the
actual tagging.


Examples:
- Nightly release:
4708018995
- Stable release: ParaN3xus/tinymist#1, ParaN3xus/tinymist#2

Extra work needed to merge this PR:
- [ ] Remove all `nightly/*` branches and create `nightly` branch
- [ ] Add `NIGHTLY_REPO_TOKEN` secret to this repo

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-07-31 20:59:11 +08:00
Myriad-Dreamin
9f7c21bb0c
fix: remove explicit requirement of secrets (#1952) 2025-07-31 20:13:57 +08:00
Myriad-Dreamin
7e925890fa
feat: build and bundle tinymist wasm into web extension (#1945)
Some checks are pending
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-07-31 01:45:25 +08:00
Myriad-Dreamin
3a4fa98b42
feat: implement delegate access model (#1943)
This is to avoid touching underlying file system if the extension is run
with liveshare.
2025-07-31 01:21:17 +08:00
Myriad-Dreamin
f9c348c7d7
feat: introduce dyn access model for futher development (#1898)
prepare for #1413 and #836
2025-07-31 00:30:13 +08:00
Myriad-Dreamin
cf20c66b26
test: ensure compile output works correctly (#1942)
Some checks are pending
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
Validate fix and prevent regression of
https://github.com/Myriad-Dreamin/tinymist/pull/1941
2025-07-30 23:25:59 +08:00
moeleak
3821861134
fix: correctly handle relative user-specified output paths in compile command (#1941)
This change ensures that user-specified output paths in the compile
command are properly handled, including relative paths.

Previously, the export task would reject relative output paths with an
error. This change converts relative paths to absolute paths by joining
them with the current working directory, allowing users to specify
relative paths like 'output/test.pdf' when compiling documents.

The fix adds path normalization using PathClean and handles the
conversion gracefully while maintaining the existing behavior for
absolute paths.

Fixes the issue where commands like:
  tinymist compile resume-en.typ ./output/test.pdf
would fail with "output path is relative" error.
2025-07-30 21:35:36 +08:00
Hong Jiarong
641b28fc45
fix: update VerbatimNode attribute to inline (#1926)
Some checks are pending
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-07-30 13:39:19 +08:00
Myriad-Dreamin
75fc5f3bca
fix: emit onSaved signal to exporter when vfs is clean (#1939)
Some checks are pending
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 bugs involves two main component: the compiler and the exporter,
the compiler compiles first and then exporter exports then. it is useful
to emit `CompileSignal::by_fs_events` to exporter even if vfs is clean
at the time we save a document.

An example triggering this bug. When user sets `exportPdf` to `onSave`,
It *bugged*:
1. OnTyped first: User types some character at T1. compiler learns that
the file content is of revision R1. the compiler compiles with revision
R1, which is needed by diagnostics event.
2. OnSaved then: Editor saves the document at T2. the compilation is
skipped early because file content is still under revision R1. In
previous version, The compilation is skipped and therefore the export is
also skipped. This is *bugged* if user sets `exportPdf` to `onSave`,
because the exporter is not run in both steps.

This PR emits the onSaved signals to both the compiler and the exporter
in the step 2.
2025-07-30 04:49:30 +08:00