Enhanced the exporter tool:
- For PDF format, added `pdf.pdfVersion`, `pdf.pdfValidator` and
`pdf.pdfTags`. `pdf.pdfVersion`, and `pdf.pdfValidator` will be combined
into `pdfStandard`, and `pdf.pdfTags` will be inverted into `noPdfTags`.
- Use `datetime-local` input for `pdf.pdfCreationTimestamp`.
- For image formats, added `pageNumberTemplate` option, since we cannot
customize that with output path for now.
<img width="1028" height="391" alt="image"
src="https://github.com/user-attachments/assets/1c0c44c9-0ea3-4f7c-a316-5a2746cb8a96"
/>
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
Adds `c` as an alias for the `compile` subcommand to match `typst-cli`
behavior where `c = compile`.
## Changes
- Added `#[clap(alias = "c")]` attribute to the `Compile` command
variant
- Added test coverage for `tinymist c --help` and actual compilation via
alias
## Usage
```bash
# Both commands now work identically
tinymist compile input.typ output.pdf
tinymist c input.typ output.pdf
```
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Support command alias `c` in tinymist-cli</issue_title>
> <issue_description>### Motivation
>
> As `typst-cli` has a alias `c = compile`, `tinymist compile` receives
exactly same arguments as `typst compile`, it will be suprise if the
alias itself is not supported.
>
> May not also applies to other subcommands.
>
> If this is feasible, I'd be willing to write a PR. This should be
easy.
>
> ### Description
>
> _No response_
>
> ### More Examples/Questions
>
> _No response_</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- FixesMyriad-Dreamin/tinymist#2259
<!-- 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%2E%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>
Configure whether to enable syntax-only mode for the language server. In
syntax-only mode, the language server will only provide syntax checking
and basic code completion, but will not perform full document
compilation or code analysis. This can be useful for improving
performance on low-end devices, devices under power-saving mode, or when
working with large documents.
Default behavior: Always disable syntax-only mode. The strategy may be
changed in the future, for example, automatically enable syntax-only
mode when the system is in power-saving mode.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Close#1830 and close#2063
The hook script feature is available since `tinymist` v0.14.2.
Hook Scripts allow you to hook and customize certain behaviors of tinymist by providing code snippets that will be executed at specific events.
The hook scripts are run as typst scripts with some predefined variables. Since typst is sandboxed, the hook scripts cannot access system directly. However, you can still bind lsp commands to perform complex operations.
See https://myriad-dreamin.github.io/tinymist/feature/script-hook.html.
- [x] run a demo
- [x] finish tests
- [x] add docs
Although we don't have enough tests about utf-8 position encoding, i.e.
it is not good to decide to use utf-8, it is completely wrong to not
passing a decided encoding back to client on initialization.
Edit: it doesn't work correctly under utf-8, so we currently always use
utf-16. We may fix it in v0.14
## Features
- Support multi-page export in the server export command. Added an extra
arg to decide whether to write to the file or only return data for
client use (page preview in exporter). VSCode users can use this feature
via the quick-export command or code lens.
- (refactor) Move most export logic from tinymist to tinymist-task,
excluding typlite-related, which already depends on tinymist-task.
- Added relevant export tests. The export e2e test now includes hash
checking for all targets.
## Not done
- Support new args in `TypstExtraArgs` for CLI compilation.
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
Previously, Tinymist preview does not work on VS Code web (code-server)
because it tries to connect to the `localhost`, which is impossible
since we are doing remote development.
Even if we fix this error, the HTTP origin check will also fail because
the domain of our VS Code web is not trusted by Tinymist. One possible
fix is to grab the `VSCODE_PROXY_URI` environment variable and check if
the incoming request matches the URI. This will fix the issue for most
standard code-server installations.
However, GitHub Codespace is an exception. I did some logging, and found
that GitHub Codespace used different origins:
- `<random>.assets.github.dev`
- `https://localhost:<port>` (note HTTP**S**)
- `None`
This is very weird and difficult to debug. Moreover, the ports forwarded
by GitHub Codespaces require authentication before visiting, which the
VS Code webview does not support. One have to open the URL in another
browser tab to authenticate. This is frustrating and is difficult to
workaround. Therefore, currently, GitHub Codespaces are not supported.
(I asked LLM to generate some of the Rust code. It works, but may need
improvements.)
Fixes#625
This PR splits `editors/vscode/src/features/tool.ts` into a few modules
to make it extensible and more maintainable:
- For tools, I put each one in a separate file.
- For messages, I grouped them into an object for dispatching.
- The disposal is better managed.
This PR adds comprehensive documentation for the Neovim Tinymist plugin,
establishing it as the canonical implementation of a Tinymist editor
language client.
## Changes Made
### Added `editors/neovim/Specification.md`
The specification was a mess, so I the reviewer deleted it.
### Enhanced `editors/neovim/CONTRIBUTING.md`
Expanded the contributing guide to document:
- **Canonical Implementation Status**: Establishes this as the
heavily-documented reference implementation for other editors
- **Bootstrap Script Commands**:
- `./bootstrap.sh editor` - Interactive editing experience in Docker
- `./bootstrap.sh test` - Headless test execution
- `./bootstrap.sh bash` - Development shell access
- **Test Suite Structure**: Overview of all spec files and their testing
purposes
- **Contribution Patterns**: Guidelines for maintaining the reference
implementation
### Updated `.github/copilot-instructions.md`
Added guidance for working with editor integrations:
- **Repository Structure**: Notes the Neovim plugin as canonical
implementation with documentation links
- **Editor Integration Guidelines**: New section specifically for
referencing Neovim patterns
- **Development Workflow**: References to bootstrap commands and
documentation
## Why This Matters
The Neovim plugin now serves as the **canonical implementation** that
other editor integrations can reference for:
- LSP client setup patterns and configuration handling
- Event subscription mechanisms for development events
- Project resolution modes (singleFile vs lockDatabase)
- Export functionality patterns (onSave, onType, never)
- Comprehensive test coverage examples
This documentation enables maintainers and contributors to understand
the complete scope of the Neovim integration and provides a reference
for implementing similar functionality in other editors.
Fixes#2081.
<!-- 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%2E%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>
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".