Commit graph

944 commits

Author SHA1 Message Date
Myriad-Dreamin
c66d2996dd
test: typlite use snapshot_testing (#1717)
* feat: use snapshot_test

* test: add snapshots
2025-04-30 20:31:02 +08:00
Myriad-Dreamin
647cda29a0
dev: split test functions for multiple crates (#1695)
* dev: split test functions for multiple crates

* build: update cargo.lock

* fix: compile error
2025-04-30 19:01:29 +08:00
Luyan Zhou
6118b346d6
feat: add path conversion actions for absolute and relative paths (#1696)
* feat: add path conversion actions for absolute and relative paths in special function call

* feat: implement matchers

* docs: edit comment

* fix: path on windows

* feat: add a comment

* dev: edit a bit

* dev: use `resolved`

* refactor: simplify path rewriting logic using `diff`

* feat: add absolute path import fixture

* fix: update path check for absolute paths to use `starts_with` to work with windows

* feat: add path expression import fixture

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-04-30 17:15:42 +08:00
Myriad-Dreamin
4871cd3917
build: bump version to 0.13.12 (#1715)
* docs: update changelog

* build: bump version to 0.13.12

* build: bump assets  to v0.13.12
2025-04-30 14:45:23 +08:00
Myriad-Dreamin
0552d4bb4f
build: bump version to 0.13.12-rc6 (#1713)
* fix: sync-ls warnings

* build: bump version to 0.13.12-rc6

* fix: lint config bug

* build: fix assets ver

* feat: bump asset crate
2025-04-30 13:53:28 +08:00
Myriad-Dreamin
48976dd1dd
fix: sync-ls warnings (#1711) 2025-04-30 02:39:56 +08:00
Myriad-Dreamin
f4a6d2b271
build: bump version to 0.13.12-rc5 (#1710)
* build: bump version to 0.13.12-rc5

* build: bump assets to v0.13.12-rc5

* docs: edit changelog
2025-04-30 02:09:28 +08:00
Myriad-Dreamin
9a91e77ee9
feat: add memory registry (#1709) 2025-04-30 01:49:11 +08:00
Myriad-Dreamin
7df144ccff
feat: disable linting by default (#1708) 2025-04-29 22:15:34 +08:00
Myriad-Dreamin
f503298f48
feat: model and make reset_read public (#1705) 2025-04-25 21:24:59 +08:00
Myriad-Dreamin
042fc2a477
feat: forbid weird embedded font uses and make toml dep optional (#1701)
* cg

* fix: forbid weird embedded

* feat: optional toml
2025-04-25 17:56:17 +08:00
Luyan Zhou
2b3eb252f0
fix: built-in CSL styles are recognized as path link (#1704) 2025-04-25 13:42:02 +08:00
Luyan Zhou
3520c90244
fix: correct parameter name in diff function for clarity (#1700)
* fix: correct parameter name in `diff` function for clarity

* fix: update parameter names in `diff` function for clarity
2025-04-23 17:26:42 +08:00
Myriad-Dreamin
84569fb98c
refactor: update comments and refactor (#1694)
* docs: update comments

* docs: refactor
2025-04-21 18:48:25 +08:00
Myriad-Dreamin
bef0f839e2
feat: update docs and remove unnecessary shared access model (#1693) 2025-04-21 17:35:36 +08:00
Myriad-Dreamin
670f2713a5
docs: update sync-ls comments (#1689)
* docs: update `sync-ls` comments

* fix: fmt
2025-04-20 16:42:42 +08:00
Myriad-Dreamin
e26d817b79
feat: optionally make symbol completion stepless (#1313)
* feat: support to steplessly complete symbols

* fix: default enum

* feat: implement it

* fix: bad nest

* dev: order

* fix: modifier
2025-04-19 11:32:53 +08:00
Myriad-Dreamin
d3134926e5
fix: fix warnings in publish dry runs (#1681) 2025-04-18 03:42:49 +08:00
Myriad-Dreamin
923155a2e2
build: bump version to 0.13.12-rc4 (#1680) 2025-04-18 02:40:51 +08:00
Myriad-Dreamin
8f4f07673f
build: bump version to 0.13.12-rc3 (#1676)
* build: bump version to 0.13.12-rc3

* build: update assets
2025-04-17 20:23:38 +08:00
Myriad-Dreamin
a3758038ee
build: bump version to 0.13.12-rc2 (#1674)
* build: bump version to v0.13.12-rc2

* build: update targets

* build: update assets

* fix: warning
2025-04-17 17:02:34 +08:00
Myriad-Dreamin
d5aad257e7
build: bump version to 0.13.12-rc1 (#1669)
* docs: update changelog

* docs: update changelog

* build: bump version to v0.13.12-rc1

* build: update assets
2025-04-17 15:35:03 +08:00
Myriad-Dreamin
b56ba42984
fix: the block is assumed to be used in expressions (#1668) 2025-04-16 18:47:08 +08:00
Myriad-Dreamin
84c211c7eb
feat: extract package implementation (#1647)
* feat: extract registry implementation

* feat: tinymist package

* fix: guard

* fix: guard 2

* feat: no specifier

* fix: temp_dir_in impl

* fix: impls

* feat: UniversePack::new

* feat: clone into memory

* feat: implement some pack for testing

* build: update cargo.lock

* feat: fit for web

* fix: guard
2025-04-16 18:19:03 +08:00
Myriad-Dreamin
9d1007a4f3
feat: refactor and add page count for the status bar format (#1666)
* feat: refactor and add page count for the status bar format

* chore: edit code style

* chore: edit code style

* chore: edit code style

* chore: edit code style

* chore: edit code style
2025-04-16 17:45:53 +08:00
Myriad-Dreamin
14f0a20ed6
fix: value used by exprs are not warned (#1664) 2025-04-16 15:37:11 +08:00
Myriad-Dreamin
4d13734fed
feat: clean up log and watch lints (#1659) 2025-04-16 15:02:49 +08:00
Myriad-Dreamin
92c5e40abd
feat: resolve roots of typst packages (#1663) 2025-04-16 13:51:33 +08:00
Myriad-Dreamin
979e0b2a55
fix: bad root change cause incorrect vfs cache frequently (#1661) 2025-04-16 12:54:34 +08:00
Myriad-Dreamin
2709aaf429
feat: allow to disable lint or lint on save (#1658)
* feat: allow to disable lint or lint on save

* fix: description
2025-04-16 03:15:56 +08:00
Myriad-Dreamin
39d13c83f6
refactor: simplify world font impl and add docs (#1645)
* fix: remove unnecessary &mut in FontResolverImpl::append_font()

* refactor: better readablity in FontResolverImpl::rebuild()

* feat: FontResovlerImpl::clone_and_rebuild()

Change FontSlot to store Arc to QueryRef<Font, FontLoader>, so we can
clone FontSlot and share the cached loaded font between different slots.

Since CompilerUniverse only holds a immutable Arc to FontResovlerImpl,
adding clone_and_rebuild method allow us to append and rebuild without
mutable access to FontResovlerImpl.

* refactor: remove partial_book and modify methods from FontResolverImpl

partial_book is removed from FontResolverImpl, all the modifying methods
are also removed.
new method get_fonts and new_with_fonts are added.
If you want to modify fonts, you can get all fonts and modify them, then
call new_with_fonts to create a new FontResolverImpl.

* refactor: SystemFontSearch, BrowserFontSearch

- Both font searcher now is just a wrapper for Vec<(FontInfo,
  FontSlot)>, typst::FontBook will be built when converting into
  FontResolverImpl.

- Provide a method with_fonts_mut() so user can get a direct mutable
  access to the under lying fonts vector to do any changes.

- Support searcher -> resolver and resolver -> searcher conversion.

* refactor: api change to biulder pattern

Method new_with_resolver() is added since CompilerUniverse only holds
Arc reference to resolver, and we can't move it out.

* fix: add fontdb::Database to SystemFontSearcher

Store fonts info in db, load them in bulk when calling flush()

* chore: merge `FontResolverImpl` and `TinymistFontResolver`

* feat: remove font profile feature

* feat: remove project font

* docs: comment the font resolver trait

* docs: comment the font slot struct

* docs: comment the crate

* test: move system tests

* dev: clean resolver

* dev: clean searchers

* dev: clean par iters

* feat: enrich memory font resolver

* todo: useless reuse

* dev: remove reuse api

* dev: build font book in `fn build`

* fix: make clippy happy

* fix: bad use

---------

Co-authored-by: c0per <60544162+c0per@users.noreply.github.com>
2025-04-15 22:23:13 +08:00
Myriad-Dreamin
3d6c712565
feat: pass world to linter (#1650) 2025-04-14 21:37:29 +08:00
Wenzhuo Liu
58ec6ab1e1
feat(lint): add warning for vf font (#1649)
* feat(lint): add warning for vf font

* feat: detect font object

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-04-12 20:55:39 +08:00
QuadnucYard
a7a22c0d70
feat: show rendered bibliography in bib hover and improve label hover (#1611)
* feat: show rendered bibliography in citation details

* adjust code and revert changes to completions

* refactor: refactor a bit

* refactor: refactor two bit

* feat: improve hover docs a bit

* test: add hover tests for label and ref

* test: add html tests

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-04-11 17:29:03 +08:00
Myriad-Dreamin
4265bc25bc
feat: simple lint types comparing with strings (#1643)
* feat: simple lint types comparing with strings

* dev: edit message

* fix: message
2025-04-10 20:02:56 +08:00
Myriad-Dreamin
23f10a2648
feat: lint ignored statements before break/continue/return (#1637)
* feat: impl it

* g

* g2

* feat: add tests

* fix: snapshot
2025-04-09 18:17:46 +08:00
Myriad-Dreamin
6cf7739fb6
feat: feed more information to linter (#1642)
* feat: move expr struct to common crate

* feat: feed more information to linter
2025-04-09 16:57:33 +08:00
Myriad-Dreamin
fcb060280d
fix: bad route to reference pages (#1641)
* test: add tests

* fix: bad route
2025-04-09 05:08:47 +08:00
Myriad-Dreamin
054d3aecc0
refactor: prepare for linting on syntaxes (#1640)
* refactor: for query

* refactor: for diag

* feat: lazy hash expr info

* feat: hash resolves

* fix: update snapshot
2025-04-09 04:10:47 +08:00
Myriad-Dreamin
01afa463f4
fix: don't highlight breaks in contextual (#1635) 2025-04-08 11:55:40 +08:00
Myriad-Dreamin
d6bce89e68
feat: lint on bug-like show/set rules (#1634)
* feat: init linter

* feat: init structure

* feat: init tests

* feat: warn on bad set rules

* feat: refactor struct

* feat: run check

* chore: update message

* chore: add hints
2025-04-08 07:36:03 +08:00
Myriad-Dreamin
ac506dcc31
refactor: move expr and ty defs to analysis crate (#1633) 2025-04-08 05:50:55 +08:00
Myriad-Dreamin
72e33e461d
refactor: remove once_cell use from tinymist (#1632)
* refactor: remove `once_cell` use from tinymist

* feat: remove more
2025-04-08 02:11:44 +08:00
Myriad-Dreamin
769fc93df9
fix: remove system time deps from crates (#1621)
* fix: remove system time deps from crates

* fix: remove system time deps from crates

* fix: smater feature gate

* docs: add some todos

* Update time.rs

* Update Cargo.toml

* build: remove hard dep chrono
2025-04-08 01:46:05 +08:00
Myriad-Dreamin
35b718452e
feat: scroll or kill all preview panels (#1451)
* feat: scroll or kill all preview panels

* feat: implement it

* docs: update comment
2025-04-07 22:04:55 +08:00
Myriad-Dreamin
e3f41f81ef
feat: check field of literals (#1619)
* feat: check field of literals

* test: add more tests

* test: update snapshot
2025-04-06 20:33:26 +08:00
Myriad-Dreamin
7f5bb5dc45
feat: resolve full ranges of bib items (#1627)
* feat: resolve full ranges of bib items

* chore: update todo
2025-04-04 17:06:09 +08:00
Myriad-Dreamin
04c013f3a4
dev: add Definition::file_id (#1626) 2025-04-04 16:08:38 +08:00
Myriad-Dreamin
bceb93b944
fix: correct name_range impl (#1623) 2025-04-04 06:25:21 +08:00
Myriad-Dreamin
59fda809d5
feat: provide AST view (#1617)
* feat: provide AST view

* test: update snapshot
2025-04-02 13:24:35 +08:00