Commit graph

57 commits

Author SHA1 Message Date
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
Myriad-Dreamin
b52ad52760
feat: completion on func.where and func.with (#204) 2024-04-20 15:17:47 +08:00
Myriad-Dreamin
b35d897919
feat: complete function parameters on signatures inferred by type checking (#203)
* dev: check upper bound types in assigning positions

* dev: check template signatures

* feat: completion with type sigatures

* dev: document a bit

* dev: save todo work on auto completion on user functions

* dev: fix document target

* dev: remove playground snaps

* dev: fix ident target

* dev: update snapshot
2024-04-20 15:03:46 +08:00
Myriad-Dreamin
987a7da867
feat: complete arguments enhanced by type inference (#186)
* auto complete code in param position

* dev: initial path completion in params

* fix: compile error

* remove two todo

* dev: improve get_deref_target

* check string during completion

* feat: complete path arguments

* feat: identify hash before function follows a content parameter

* dev: complete text.size, text.dir, stack.dir, stroke dict

* dev: add record type

* dev: complete stroke dict

* fix: correct kind of langauge of code tooltip

* dev: add colon trigger character

* dev: let type selection complete

* dev: complete inset/outset/margin/radius dictionary types

* dev: complete raw theme/syntaxes, bib path types

* dev: complete all files at the same time

* dev: update snapshot
2024-04-15 00:17:54 +08:00
QuarticCat
ebed95cbcd
fix: improve release profile & fix typos (#177)
* dev: split a gh-release profile to accelerate development

* fix: many typos

* fix: miri warnings

* fix: update fixtures
2024-04-10 11:34:18 +08:00
Myriad-Dreamin
1c5c6bd929
feat: go to definition of include paths (#156) 2024-04-04 11:11:23 +08:00
Myriad-Dreamin
bd610b2323
feat: auto complete parameters after completing a function (#150)
* feat: auto complete parameters after completing a function

* dev: update snapshot

* dev: update completion snapshot
2024-04-02 18:50:02 +08:00
Myriad-Dreamin
d708bdfe2d
feat: complete parameters on user functions (#148)
* fix: skip tabs that have no uris for reopening pdf

* dev: lift call analysis

* feat: complete parameters on user functions
2024-04-02 17:12:20 +08:00
Myriad-Dreamin
f7fd47d62c
dev: don't do complete on definition itself (#135)
* dev: don't do completion on definition itself.

* dev: update snapshot hash
2024-03-30 21:09:06 +08:00
Myriad-Dreamin
36536bbc6b
feat: support import path completion (#134)
* feat: path completion

* fix: package snippet order

* dev: update snapshot hash

* fix: completion
2024-03-30 20:44:27 +08:00
Myriad-Dreamin
0eae40dec6
dev: intern completion code (#124)
* dev: intern completion code

* dev: change completion kind of symbols to FIELD

* fix: accept hash

* fix: reduce redundant information
2024-03-29 19:46:10 +08:00
Myriad-Dreamin
76b4e91046
feat: allow running server with loading font once and on rootless files (#94)
* dev: change system config

* docs: update config doc

* dev: clean up tightly coupled world

* dev: load font once

* docs: add more comments to tinymist-query

* dev: merge compiler layers

* feat: allow run lsp on rootless files

* build: bump ts

* fix: workspace dep

* build: bump preview

* dev: correctly check inactive state

* fix: weird cargo default features
2024-03-26 10:33:56 +08:00
Myriad-Dreamin
cc1f418423
dev: reduce a bundle of ts usage in query crate (#72) 2024-03-18 23:00:27 +08:00
Myriad-Dreamin
9d344570b4
dev: borrow the document state inside of compiler (#33) 2024-03-14 20:37:14 +08:00