Commit graph

70 commits

Author SHA1 Message Date
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
Myriad-Dreamin
10ec787cc9
dev: stateful requests now accept snapshot (#1581)
* dev: stateful requests now accept snapshot

* dev: add some convenient methods

* dev: remove unused latest_doc state

* dev: use graph

* docs: comment

* fix: bad flag
2025-03-25 16:28:00 +08:00
Myriad-Dreamin
92e9f797de
feat: don't trigger parameter hints when skipping parameters (#1557)
* build: record command in completion snapshots

* feat: don't trigger parameter hints when skipping parameters

* test: update snapshot
2025-03-20 21:53:38 +08:00
Myriad-Dreamin
9b9a674118
fix: revert the explicit detection again (#1525)
* fix: revert the explicit detection again

* test: revert the snapshot

* test: add more tests
2025-03-19 13:07:10 +08:00
Myriad-Dreamin
7399fccd5a
feat: detect explicit completion from vscode (#1496)
* fix: prevent completion list from showing on bad pos

* feat: detect explicit completion from vscode

* fix: cases

* test: update snapshot
2025-03-13 12:05:47 +08:00
Myriad-Dreamin
f13b632ad2
feat: handle enters in list or enum items (#1442)
* test: add tests about `onEnter`

* feat: handle enters in list or enum items
2025-03-05 12:30:47 +08:00
Myriad-Dreamin
3bc5f19cf5
feat: convert TypstDocument to enum (#1256)
* feat: convert `TypstDocument` to enum

* fix: errors

* build: update cargo.lock

* fix: warnings

* fix: error

* html changes

* Revert "html changes"

This reverts commit f9fc0e4872.

* Revert "Revert "html changes""

This reverts commit 7dc554a9e4.

* use std typst docs

* span

* paged

* paged

* html change

* paged

* html change

* bytes

* paged

* paged

* paged

* html changes

* paged

* html changes

* paged
2025-02-03 11:17:58 +08:00
Myriad-Dreamin
56714675b7
feat: encode and use workspace information into PackageSpec (#1187)
* feat: remove an unused API

* feat: encode workspace information into `PackageSpec`

* feat: remove unused real_path

* feat: remove unused mtime

* feat: add ResolveAccessModel

* feat: implement id overlay semantics

* feat: remove mtime checking in overlay model

* feat: remove mtime checking in notify model

* feat: format ids

* fix: cases

* feat: resolve root by world

* dev: add untitled root

* fix: warnings

* fix: a wrong usage

* fix: snapshots

* fix: tests
2025-01-19 11:51:00 +08:00
Myriad-Dreamin
81d3ea64c2
refactor: split completion functions by topics (#1083) 2024-12-28 12:45:45 +08:00
Myriad-Dreamin
ef4714c195
dev: make eco completion repr and reduce clones (#1079)
* dev: create pair

* dev: make eco completion repr

* dev: reduce some clones
2024-12-28 09:52:47 +08:00
Myriad-Dreamin
451dc9dbdd
refactor: enclose contextual information in CompletionCursor (#1078)
* refactor: reduce some useless code

* refactor: move contextual things to a context

* refactor: force range calculation in place
2024-12-27 22:38:14 +08:00
Myriad-Dreamin
282b1d7b4d
refactor: merge some calculation stuff in completion worker (#1077) 2024-12-27 16:55:07 +08:00
Myriad-Dreamin
fb528ec70a
refactor: move completion code in request into worker (#1076)
* refactor: matcher tests

* refactor: move completion code in request into worker

* dev: move one use
2024-12-27 13:59:04 +08:00
Myriad-Dreamin
9c8d1461b7
refactor: merge completion stuff (#1074)
* dev: move two syntax completion to ext

* feat: move mode completion in ext.rs

* dev: clean code

* refactor: merge completion stuff

* test: update snapshot
2024-12-27 13:00:38 +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
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
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
4f5c9c7735
feat: convert mode-aware snippets to static data (#982) 2024-12-11 13:58:08 +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
ed79045588
dev: disable all runtime check to log::debug! (#912) 2024-11-29 19:52:42 +08:00
Myriad-Dreamin
422971c8b6
fix: skip code completion when editing length (#882) 2024-11-22 16:15:40 +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
06773da8af
feat: pass completion configs via context (#863) 2024-11-20 16:06:28 +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
8f3566366e
refactor: refactor hover, analysis/global, and docs crates (#755)
* dev: refactor hover.rs

* refactor refactor AnalysisContext

* refactor: refactor docs crate
2024-10-31 10:07:31 +08:00
Myriad-Dreamin
ac97c34d0f
feat: improve signature formatting in docs (#750)
* feat: improve signature formatting in docs

* test: update snapshot

* fix: package docs formatting
2024-10-30 15:17:08 +08:00
Myriad-Dreamin
493f8a8695
feat: don't trigger trivial completion when the trigger char is an ascii punctuation (#748) 2024-10-29 22:32:12 +08:00
Myriad-Dreamin
e8f5f6185a
fix: match identifier like nodes for completion (#747)
* fix: match identifier like nodes for completion

* test: update snapshot
2024-10-29 22:09:55 +08:00
Myriad-Dreamin
9c87fe2fb4
feat: client-side control to whether issue completion callback (#744)
* feat: client-side control to whether issue completion callback

* fix: bad changes
2024-10-29 13:00:57 +08:00
Myriad-Dreamin
1d49e110e2
dev: cache expression information correctly (#736)
* dev: cache expression information correctly

* rev
2024-10-27 20:20:59 +08:00
Myriad-Dreamin
02bbdbf8d9
feat: incorporated with static function signature analysis (#688)
* feat: finished function signature analysis

* dev: update snapshot

* dev: broken snapshot
2024-10-16 15:53:43 +08:00
Myriad-Dreamin
7bc30bf2fa
test: init completion package tests (#672) 2024-10-14 13:15:27 +08:00
Myriad-Dreamin
6ce6bb8018
fix: refine label types to remove hacking citation filter (#603)
* test: check types

* test: confirm bug

* fix: refine label types

* dev: update snapshot

* dev: update snapshot
2024-09-20 12:30:36 +08:00
Yifan Song
1295c8754a
feat: find references for Ref and Label (#527)
* add test for `goto_definition` with label reference

* simplify test for `goto_definition` with reference

* abstract compile doc for test

* add snap for goto_definition label reference

* basic goto_reference with simple test

* basic find_reference for Ref

* fix: a bug in linked def

* Remove unwanted compile directive compile: true

* simply compile and get depended files fail for corss_file_ref_label

* update ref reference but still fail to get source from path

* fix: reuse find definition effort and handle undefined references for labels

* dev: update test case

* fix: label reference analysis

* fix: rust analyzer doing bad

* dev: update snapshot

* dev: lift common pattern

* fix: unstable snapshot

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-08-14 09:21:44 +08:00
Yifan Song
0fce237d57
test: add test for goto_definition for label (#510)
* add test for `goto_definition` with label reference

* simplify test for `goto_definition` with reference

* abstract compile doc for test

* add snap for goto_definition label reference
2024-08-12 17:08:34 +08:00
Zike Xu
60f3200088
fix: apply label instead of bib title name in at completion (#485)
* fix: apply label instead of bib title name in `at` completion

* test: snapshot testing for #483

* test: add more label-related snapshot testings

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-08-04 23:33:02 +08:00
Zike Xu
7b8b3938a2
feat: support querying label with paper name in bib items (#365)
* feat: support querying label with paper name in bib items

* dev: distinguish ref and bib title

* dev: distinguish ref and bib title 2

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2024-07-25 10:14:31 +08:00
Myriad-Dreamin
8413c66c51
fix: wrong checked prefix on completing strings (#422) 2024-07-17 15:34:33 +08:00
Myriad-Dreamin
c8977f0052
dev: don't complete literal themselves (#291) 2024-05-15 14:54:56 +08:00
Myriad-Dreamin
fff227f3ae
dev: interning types (#271)
* refactor: a bit

* fix: named completion

* dev: replace complete_literal by complete_type

* dev: remove unused code

* dev: basic interner

* dev: basic types

* dev: type operations

* dev: migrate all type definitions

* dev: check syntax and builtin types

* dev: make TypeSimplifier simply work

* dev: make TypeDescriber simply work

* dev: make TypeChecker simply work

* dev: recover type check

* fix: context check

* fix: use after free in seen fields

* fix: typed with

* fix: record type on field

* dev: check type of constructors and element containing

* dev: show sig by type

* fix: mixed context checking

* QAQ

* >_<

* dev: fix documents
2024-05-11 21:12:49 +08:00
Myriad-Dreamin
e2b7bc4b56
refactor: introduce uri_for_id and deref_syntax_at (#267)
* dev: add documentation

* refactor: introduce uri_for_id and deref_syntax_at
2024-05-09 12:32:20 +08:00
Myriad-Dreamin
01f72c3d75
dev: simplify a bit (#265)
* fix: clippy

* dev: simplify a bit
2024-05-09 12:12:49 +08:00
Myriad-Dreamin
869960a89c
dev: {re,}move conversions of completion structs (#264)
* dev: {re,}move conversions

* dev: update dependencies
2024-05-09 12:04:42 +08:00
Myriad-Dreamin
7e59b9dbcb
dev: identify let context completely (#255) 2024-05-07 19:26:31 +08:00
Myriad-Dreamin
bbded48a1b
dev: insert commas in arg context for completing before identifiers (#251) 2024-05-07 19:03:25 +08:00
Myriad-Dreamin
bf8a505135
feat: check surrounding syntax for elements/selectors (#236)
* feat: check surrounding syntax for elements/selectors

* dev: update snapshot

* dev: update snapshot
2024-05-05 19:36:30 +08:00
Myriad-Dreamin
10fad2ecde
dev: run completion snapshots with filtering (#230) 2024-05-04 14:17:13 +08:00