fix: identify chained dot access (#1488)

This commit is contained in:
Myriad-Dreamin 2025-03-11 23:03:24 +08:00 committed by GitHub
parent b4312eea83
commit db1ff20a6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 84 additions and 2 deletions

View file

@ -0,0 +1,3 @@
/// contains: fill
#context text./* range 0..1 */

View file

@ -0,0 +1,5 @@
/// contains: fill
#context {
text./* range 0..1 */
}

View file

@ -0,0 +1,30 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on / (34..35)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/context_text.typ
---
[
{
"isIncomplete": false,
"items": [
{
"kind": 6,
"label": "fill",
"textEdit": {
"newText": "fill",
"range": {
"end": {
"character": 14,
"line": 2
},
"start": {
"character": 14,
"line": 2
}
}
}
}
]
}
]

View file

@ -0,0 +1,30 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on / (38..39)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/context_text2.typ
---
[
{
"isIncomplete": false,
"items": [
{
"kind": 6,
"label": "fill",
"textEdit": {
"newText": "fill",
"range": {
"end": {
"character": 7,
"line": 3
},
"start": {
"character": 7,
"line": 3
}
}
}
}
]
}
]