Commit graph

525 commits

Author SHA1 Message Date
Myriad-Dreamin
22d2ed88a3
fix: don't complete import items across line (#952) 2024-12-06 13:29:21 +08:00
Yifan Song
b4ecb7f14b
feat: complete on import item path (#949)
The import item path syntax was introduced in typst 0.12.0 and had ruin the completion on import items.

* fix: grandparent is ImportItems

Fix: for `import "lib.typ": tes|`, the parent syntax is import item
path, then parent is import items

* feat: identify syntax context in import list

* feat: check the path under cursor for import completion

* fix: adjust from correctly

* dev: remove useless log

* fix: the unknown font on windows

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-12-06 11:35:59 +08:00
Myriad-Dreamin
a7f203a31c
fix: don't assert well-formed named parameters in docstring (#948) 2024-12-05 16:10:27 +08:00
Myriad-Dreamin
d5c07b1ae3
refactor: move entry resolver to query crate (#944) 2024-12-04 13:13:26 +08:00
Myriad-Dreamin
356fc2daad
refactor: reduce state and add tests (#943) 2024-12-04 11:45:26 +08:00
Myriad-Dreamin
00aecd9eae
refactor: split entry resolver (#942)
* refactor: split entry resolver

* refactor: naming
2024-12-04 11:05:28 +08:00
Myriad-Dreamin
c0d20cd1b2
refactor: make shared root paths (#929) 2024-12-04 06:44:55 +08:00
Myriad-Dreamin
ace3df5409
feat: dynamic analyze import source for star imports (#935) 2024-12-03 17:02:54 +08:00
Myriad-Dreamin
e8b8188c1f
fix: convert two touched panics to log::warn in signature checker (#934) 2024-12-03 17:02:40 +08:00
Myriad-Dreamin
b38e9bdf0e
feat: resolve module references in import at syntax level (#933) 2024-12-03 16:15:48 +08:00
Myriad-Dreamin
3c98d574a2
feat: provide elementary font view (#932)
* dev: font view

* dev: tune functionality

* dev: add a todo
2024-12-03 12:20:27 +08:00
Myriad-Dreamin
d9717fffa2
test(ci): add fmt, clippy, doc, and msrv tests to CI (#926)
* test(ci): add fmt, clippy, doc, and msrv tests to CI

* test(ci): check and build typst-preview

* fix: checks
2024-12-02 20:28:29 +08:00
Myriad-Dreamin
e1a5f0cdd7
dev: remove unused typst-kit (#924) 2024-12-02 18:08:26 +08:00
Myriad-Dreamin
032c81e93a
feat: add package related arguments to typstExtraArgs (#923)
* feat: use typst-kit's package functions

* feat: add package related arguments to `typstExtraArgs`

* feat: don't use typst-kit's downloader

* dev: improve a bit

* dev: less lazy

* dev: less interfaces
2024-12-02 17:47:28 +08:00
Myriad-Dreamin
531b8d6737
feat: check interface of all scope-like values (#920)
* feat: check interface of all scope-like values

* test: update snapshot
2024-11-30 23:24:22 +08:00
Myriad-Dreamin
63b31c6186
feat: convert values in builtin modules to definition (#919) 2024-11-30 23:05:00 +08:00
Myriad-Dreamin
982c430338
test: add tests about signature help (#917) 2024-11-30 22:50:58 +08:00
Myriad-Dreamin
d4141c8e74
fix: detect surrounding syntax of argument lists in show rule (#914) 2024-11-29 20:21:28 +08:00
Myriad-Dreamin
692e53880b
dev: deduplicate type bounds early (#913)
* case: package subpar:0.2.0
2024-11-29 20:04:35 +08:00
Myriad-Dreamin
ed79045588
dev: disable all runtime check to log::debug! (#912) 2024-11-29 19:52:42 +08:00
Myriad-Dreamin
b8f65cf2ec
fix: clippy warnings in rust 1.83 (#907) 2024-11-29 14:50:22 +08:00
Myriad-Dreamin
6d5c353fc0
fix: replace separator of type check snapshots from '---' to '=====' (#903) 2024-11-26 20:32:45 +08:00
Caleb Maclennan
6f4aba4aa8 chore: Fix typos throughout code base (automatic)
This is all the typos that `typos` is confident can just be fixed
automatically, minus the overrides added to the manifest for the false
positives I found.
2024-11-25 09:26:53 +08:00
Myriad-Dreamin
e1848488f0
revert: undo "feat: add package related arguments to typstExtraArgs (#832 and #833)" (#891)
* Revert "fix: cross build with `vendor-openssl` feature and bump version to 0.12.4-rc2 (#884)"

This reverts commit 254c4ce087.

* Revert "feat: add package related arguments to `typstExtraArgs` (#833)"

This reverts commit 8e36f25cf2.

* Revert "feat: use typst-kit's package functions (#832)"

This reverts commit d2afe78fee.

* build: bump version to 0.12.4-rc3

* docs: update changelog
2024-11-23 14:17:40 +08:00
Myriad-Dreamin
254c4ce087
fix: cross build with vendor-openssl feature and bump version to 0.12.4-rc2 (#884)
* fix: cross build with `vendor-openssl` feature

* build: bump version to 0.12.4-rc2
2024-11-22 17:53:09 +08:00
Myriad-Dreamin
422971c8b6
fix: skip code completion when editing length (#882) 2024-11-22 16:15:40 +08:00
Myriad-Dreamin
94ea230645
feat: add code action to wrap content blocks (#881) 2024-11-22 16:03:07 +08:00
Myriad-Dreamin
3207f57a78
feat: add more postfix snippets (#880) 2024-11-22 15:39:59 +08:00
Myriad-Dreamin
67e659a878
feat: prefer to guide coding by signature help (#874)
* feat: prefer to guide coding by signature help

* test: update markdown description

* test: update configuration for testing
2024-11-21 13:14:58 +08:00
Myriad-Dreamin
1ba6b6c1e0
test: update snapshots in legacy format (#873) 2024-11-21 12:55:57 +08:00
Myriad-Dreamin
a13c8e41ba
fix: replace [] with .bracket in label (#870)
* fix: replace `[]` with `.bracket` in label

* test: update snapshot
2024-11-20 20:46:03 +08:00
Myriad-Dreamin
644494b1dc
feat: rename links in files (#869) 2024-11-20 16:55:48 +08:00
Myriad-Dreamin
6f4b916598
feat: provide both bracket and paren completion (#867)
* feat: provide both bracket and paren completion

* test: update snapshot
2024-11-20 16:55:34 +08:00
Myriad-Dreamin
9885c45fb2
dev: cache link expressions (#866) 2024-11-20 16:24:12 +08:00
Myriad-Dreamin
19a83bc942
feat: reorder snippet completion items (#865) 2024-11-20 16:19:45 +08:00
Myriad-Dreamin
18c6cdd9d4
feat: add search index to quickly filter unrelated files (#864) 2024-11-20 16:14:32 +08:00
Myriad-Dreamin
06773da8af
feat: pass completion configs via context (#863) 2024-11-20 16:06:28 +08:00
Myriad-Dreamin
ba2f1bcfb2
fix: refine some scope condition for type completion (#862) 2024-11-20 16:06:15 +08:00
Myriad-Dreamin
d8ee287b77
feat: replace rule completion with scoped type completion (#861)
* feat: replace rule completion with scoped type completion

* test: update snapshot
2024-11-20 15:49:58 +08:00
Yifan Song
e2c8418c35
fix: use correct base directory for path completion (#854)
* fix wrong diff_path

* refactor: simplify no base.parent()
2024-11-20 11:14:29 +08:00
Myriad-Dreamin
6c342eb23e
dev: don't complete bracket in math context (#860) 2024-11-20 09:20:20 +08:00
Myriad-Dreamin
698d86f9b0
dev: check previous syntax first for show/set syntax (#859) 2024-11-20 02:43:10 +08:00
Myriad-Dreamin
6f8d9750d7
feat: improve and filter completion in show/set syntax (#858) 2024-11-20 02:15:53 +08:00
Myriad-Dreamin
37ea3b8d3d
dev: filter settable parameter if is in set context (#857) 2024-11-20 01:47:56 +08:00
Myriad-Dreamin
ab3716d866
feat: postfix completion on values (#850)
* feat: postfix completion on values

* dev: delete an ovo-log
2024-11-19 13:36:14 +08:00
Myriad-Dreamin
d0b40dbfa6
feat: provide UFCS-style completion on content types (#849)
* feat: UFCS completion on content types

* dev: cleanup panics

* feat: add configuration about postfix completion

* test: update snapshot

* fix: lazily determine default values
2024-11-19 12:48:04 +08:00
Myriad-Dreamin
a1a15a6795
feat: complete bracket if the function accepts an only content arg (#848)
* feat: complete bracket if the function will accept an only content argument

* test: update snapshot
2024-11-19 11:04:27 +08:00
Myriad-Dreamin
ccd3cea08c
feat: improve caches of calls and module exports type checking (#847)
* dev: optimize log on critical paths

* dev: optimize `check_module_item`

* dev: cache source queries

* dev: cache call checking

* dev: remove source cache
2024-11-18 17:20:05 +08:00
Myriad-Dreamin
256dd3b3a5
feat: replace param_completions with post type checking (#846)
* feat: replace param_completions with post type checking

* dev: dirty code and snapshot
2024-11-18 17:01:28 +08:00
Myriad-Dreamin
90626f0a5f
test: add more completion tests (#845) 2024-11-18 13:12:57 +08:00