typst / typst

A new markup-based typesetting system that is powerful and easy to learn.
https://typst.app
Apache License 2.0
28.79k stars 786 forks source link

Test framework for autocompletion #2897

Open astrale-sharp opened 5 months ago

astrale-sharp commented 5 months ago

Description

Being able to write test verifying autocomplete works as expected

Use Case

Solidify the stability/quality of the autocompletion ide feature

astrale-sharp commented 5 months ago

Taking inspiration from existing tests, we could have something in the lines of

// Autocomplete: true

// (1st question, should we ignore snippets?)

// Autocomplete: -1 only "dictionary" 
diction

// Autocomplete: -1 includes: "at", "insert", "contains"
// Autocomplete: -1 excludes: "foo"
dictionary.

-1 references the last character of the line just below

astrale-sharp commented 5 months ago

I went out and started working on the test framework in #2912 comments/discussion are appreciated