Commit graph

555 commits

Author SHA1 Message Date
Myriad-Dreamin
362f625949
feat: complete fields by type (#1050)
* feat: complete fields by type

* test: update snapshot

* dev: store documentation

* test: check content type

* test: update snapshot

* test: update snapshot
2024-12-22 15:27:03 +08:00
Myriad-Dreamin
497a1e0aea
refactor: simplify and document lsp_typst_boundary crate (#1049) 2024-12-22 11:21:04 +08:00
Myriad-Dreamin
5db1cf984a
feat: infer types of show rule transformers (#1045)
* feat: infer types of show rule transformers

* test: add test for show rules

* feat: more selector cases

* test: update snapshot
2024-12-22 10:42:07 +08:00
Myriad-Dreamin
458695b3a0
feat: check input constraints of simple functions (#1042) 2024-12-21 17:57:42 +08:00
Myriad-Dreamin
a814c7a63d
dev: move field_access_completions (#1041) 2024-12-21 13:51:09 +08:00
Myriad-Dreamin
a4de68a1ca
fix: determine name_started in sig constructors (#1038)
* fix: name_started in sig constructors

* fix: test it
2024-12-21 13:50:37 +08:00
Myriad-Dreamin
97541d54f8
fix: identify closure as regular surrounding syntax (#1040) 2024-12-21 13:23:36 +08:00
Myriad-Dreamin
1c157adadf
fix: don't check context of field accesses' target (#1039) 2024-12-21 13:23:21 +08:00
Yifan Song
d9cec6e89b
feat: comment complete for tidy style doc comment (#1029)
* feat: basic dot comment completion

* fix: add parameter desc placeholders

* add todo

* fix: spread repr

* update snapshot hash

* fix: handle pattern single ident

* refactor: remove a useless log

* update e2e hash

* fix: rename Tidy Doc into Document function

* fix: get rid of additional edit with trim prefix

* fix: strict doc comment condition
2024-12-21 10:42:55 +08:00
Myriad-Dreamin
1eb63870fd
refactor: final touch and complete matchers (#1036)
* perf: minor optimize matches to dot access

* refactor: final touch and complete matchers

* dev: change name back
2024-12-20 20:56:45 +08:00
Myriad-Dreamin
980571ad61
feat: use field access classifier for completion (#1035)
* feat: use field access classifier for completion

* dev: more cases about dot access
2024-12-20 19:15:59 +08:00
Myriad-Dreamin
39243ba626
feat: classify field accesses for ide functions (#1034)
* feat: classify field accesses for ide functions

* test: update snapshot
2024-12-20 18:47:44 +08:00
Myriad-Dreamin
7dbaca8851
refactor: update names and documentation of matchers (cont.) (#1033) 2024-12-20 18:35:36 +08:00
Myriad-Dreamin
de8e45a539
refactor: rename local variables (cont.) (#1026) 2024-12-18 19:48:34 +08:00
Myriad-Dreamin
be1d659719
refactor: rename local variables and some types (#1023)
* fix: naming

* refactor: rename local variables and some types
2024-12-18 19:23:31 +08:00
Myriad-Dreamin
ad0c1e8aca
refactor: improving names of matched structs and documenting matchers (#1022) 2024-12-18 16:35:15 +08:00
Myriad-Dreamin
902bd17cba
test: add tests about math dot completion (#1021) 2024-12-18 15:53:54 +08:00
Myriad-Dreamin
0f512dd09e
fix: forbid ident code completion in field access (#1020)
* feat: forbid ident code completion in field access

* test: update snapshot
2024-12-18 15:53:34 +08:00
Myriad-Dreamin
142138297e
fix: complete field access even if its parent is a closure (#1019)
* dev: complete field access even if it's parent is a closure

* test: update snapshot
2024-12-18 15:06:57 +08:00
Myriad-Dreamin
e116b0b645
test: cover cases about completing after the dot operator (#1017)
* test: add field tests

* dev: add a snapshot
2024-12-18 13:12:55 +08:00
Myriad-Dreamin
c0c6503f17
test: cases about completing field access in function call (#958) 2024-12-18 11:59:36 +08:00
Yifan Song
5f8a11bdc0
fix: resolve #986 avoid wrong offset on Neovim for some postfix snippets (#966)
* fix: avoid additional text_edit

* unify redundant to_lsp_snippet

* fix: remove redundant default_postfix_snippet

* fix: with single complete

* clean import

* chore: revert move to_lsp_snippet
2024-12-18 11:27:52 +08:00
Yifan Song
b19810ea6f
feat: add in postfix snippet (#963) 2024-12-12 15:01:55 +08:00
Myriad-Dreamin
382d73ddeb
refactor: remove inlay_hint function for simplicity (#992)
* refactor: remove `inlay_hint` function for simplicity

* test: update snapshots of inlay hints

* test: update snapshot
2024-12-12 14:21:04 +08:00
Myriad-Dreamin
ca3c29fc2d
docs: rename link_exprs crate to link_expr (#991) 2024-12-12 13:48:04 +08:00
Myriad-Dreamin
57e209f7e0
docs: split and documenting document highlight worker (#989) 2024-12-12 13:26:01 +08:00
Myriad-Dreamin
5747dd6ba6
feat: explicitly trigger suggest after completed import/include snippets (#984)
* feat: explicitly trigger suggest on completing import/include snippets

* fix: comment

* test: update snapshot
2024-12-11 14:40:57 +08:00
Myriad-Dreamin
4f5c9c7735
feat: convert mode-aware snippets to static data (#982) 2024-12-11 13:58:08 +08:00
Myriad-Dreamin
3473fb88a5
refactor: rename code_exprs crate to code_expr (#981) 2024-12-11 13:38:53 +08:00
Myriad-Dreamin
dd60ce5781
refactor: remove a closure in code lens solver (#979) 2024-12-11 11:26:32 +08:00
Myriad-Dreamin
10d72f139e
docs: documenting color expr worker (#980) 2024-12-11 11:04:08 +08:00
Myriad-Dreamin
dde3f5dff1
docs: rearrange and documenting cache structures (#978) 2024-12-11 11:03:58 +08:00
Myriad-Dreamin
678b2d2111
docs: split and documenting code action worker (#977)
* docs: split and documenting code action worker

* dev: update prelude
2024-12-11 11:03:47 +08:00
Myriad-Dreamin
c430e3d051
feat: type check labels with tolerating syntax error (#975)
* feat: type check labels with tolerating syntax error

* fix: naming

* fix: use and type
2024-12-10 18:49:06 +08:00
Myriad-Dreamin
2f882378bc
dev: complete labels with tolerating syntax error (#974) 2024-12-10 16:05:19 +08:00
Myriad-Dreamin
00195884de
test: add test about half-completed labels (#973)
* test: add test about half-completing labels

* space
2024-12-10 15:38:23 +08:00
Myriad-Dreamin
f665d7c50c
test: add test about path completion (#972) 2024-12-10 15:05:51 +08:00
Myriad-Dreamin
969cc6d339
refactor: complete paths without hacking (#971)
* refactor: complete paths without hacking

* dev: move code after refactor
2024-12-10 14:29:24 +08:00
Myriad-Dreamin
ab234634a9
fix: complete import path by syntax instead of type (#968)
* fix: complete import path by syntax instead of type

* test: add import package tests

* fix: unused item
2024-12-08 21:59:35 +08:00
Myriad-Dreamin
fee46d2123
fix: other two wrong usages of analyze_import (#967) 2024-12-08 21:33:53 +08:00
Myriad-Dreamin
2eddcbd87f
feat: check surrounding syntax when performing type completion (#965)
* feat: check surrounding syntax when performing type completion

* test: add testcases
2024-12-08 16:44:33 +08:00
Myriad-Dreamin
a54bc5d80c
feat: enrich all type completions consistently (#964) 2024-12-08 12:00:18 +08:00
Yifan Song
0464af6acf
fix: complete import items on spaces, colons, and commas (#962)
* fix: import item complete

* fix: cursor better than start

* fix: strengthen snapshot

* fix: cases on empty import list

* feat: matches on comma in import list

* test: simplify testcases and update snapshots

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-12-08 11:54:33 +08:00
Yifan Song
44b3f3f8c1
fix: simplify types of variables for hover tooltip (#959)
* feat: type for hover on var

* test: update snapshots for hover on params

* fix: simplify type before formatting

* test: update snapshot

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-12-07 19:32:40 +08:00
Myriad-Dreamin
9efc3d55d5
fix: typos in tinymist-query (#956) 2024-12-07 11:25:34 +08:00
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
ace3df5409
feat: dynamic analyze import source for star imports (#935) 2024-12-03 17:02:54 +08:00