mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 05:05:00 +00:00
fix: correct field access dot target (#1489)
* fix: correct field access dot target * test: add cases about #1267
This commit is contained in:
parent
db1ff20a6d
commit
4bf6cdb9ed
9 changed files with 182 additions and 2 deletions
|
@ -0,0 +1,4 @@
|
|||
/// contains: first
|
||||
|
||||
#let dict = (first: (second: "value"))
|
||||
#dict.fi/* range 0..1 */
|
|
@ -0,0 +1,4 @@
|
|||
/// contains: second
|
||||
|
||||
#let dict = (first: (second: "value"))
|
||||
#dict.first.sec/* range 0..1 */
|
|
@ -0,0 +1,3 @@
|
|||
/// contains: sin
|
||||
|
||||
#if std.calc./* range 0..1 */
|
|
@ -0,0 +1,5 @@
|
|||
/// contains: sin
|
||||
|
||||
#{
|
||||
if std.calc./* range 0..1 */
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: Completion on / (68..69)
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/dict_chain_access.typ
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 6,
|
||||
"label": "first",
|
||||
"textEdit": {
|
||||
"newText": "first",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 8,
|
||||
"line": 3
|
||||
},
|
||||
"start": {
|
||||
"character": 6,
|
||||
"line": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: Completion on / (76..77)
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/dict_chain_access2.typ
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 6,
|
||||
"label": "second",
|
||||
"textEdit": {
|
||||
"newText": "second",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 15,
|
||||
"line": 3
|
||||
},
|
||||
"start": {
|
||||
"character": 12,
|
||||
"line": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: Completion on / (32..33)
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/markup_chain.typ
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 3,
|
||||
"label": "sin",
|
||||
"textEdit": {
|
||||
"newText": "sin(${1:})",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 13,
|
||||
"line": 2
|
||||
},
|
||||
"start": {
|
||||
"character": 13,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: Completion on / (36..37)
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/markup_chain2.typ
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 3,
|
||||
"label": "sin",
|
||||
"textEdit": {
|
||||
"newText": "sin(${1:})",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 14,
|
||||
"line": 3
|
||||
},
|
||||
"start": {
|
||||
"character": 14,
|
||||
"line": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue