mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
fix: correct bound self checking (#1564)
This commit is contained in:
parent
af78414788
commit
87651913af
5 changed files with 50 additions and 8 deletions
|
@ -134,7 +134,16 @@ impl CompletionPair<'_, '_, '_> {
|
|||
continue;
|
||||
}
|
||||
|
||||
self.value_completion(Some(name.clone()), bind.read(), elem_parens, None);
|
||||
self.value_completion_(
|
||||
bind.read(),
|
||||
ValueCompletionInfo {
|
||||
label: Some(name.clone()),
|
||||
parens: elem_parens,
|
||||
docs: None,
|
||||
label_details: None,
|
||||
bound_self: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
if let Some(scope) = value.scope() {
|
||||
|
@ -150,7 +159,7 @@ impl CompletionPair<'_, '_, '_> {
|
|||
parens: elem_parens,
|
||||
docs: None,
|
||||
label_details: None,
|
||||
bound_self: true,
|
||||
bound_self: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/// contains: clusters
|
||||
|
||||
#"".clu/* range 0..1 */
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: Completion on / (31..32)
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/func_cluster.typ
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 3,
|
||||
"label": "clusters",
|
||||
"textEdit": {
|
||||
"newText": "clusters()${1:}",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 7,
|
||||
"line": 2
|
||||
},
|
||||
"start": {
|
||||
"character": 4,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -9,14 +9,10 @@ input_file: crates/tinymist-query/src/fixtures/completion/func_self.typ
|
|||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"command": {
|
||||
"command": "tinymist.triggerSuggestAndParameterHints",
|
||||
"title": ""
|
||||
},
|
||||
"kind": 3,
|
||||
"label": "flatten",
|
||||
"textEdit": {
|
||||
"newText": "flatten(${1:})",
|
||||
"newText": "flatten()${1:}",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 7,
|
||||
|
|
|
@ -9,10 +9,14 @@ input_file: crates/tinymist-query/src/fixtures/completion/func_self2.typ
|
|||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"command": {
|
||||
"command": "tinymist.triggerSuggestAndParameterHints",
|
||||
"title": ""
|
||||
},
|
||||
"kind": 3,
|
||||
"label": "flatten",
|
||||
"textEdit": {
|
||||
"newText": "flatten()${1:}",
|
||||
"newText": "flatten(${1:})",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 11,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue