redhat-developer / redhat-developer/quarkus-ls
Completion for Qute expression doesn't work when expression is not closed.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 50
- Forks
- 18
- Avg merge
- 22h 11m
- Merged PRs (30d)
- 3
Description
Given this template:
{@String[] items}
{#for item in items}
{i|
{/for}
Open completion after {i, completions shows nothing, but LSP traces of completion returns something. I suspect it is a matter of text edit which is not computed correcty of filter text?
If exression is closed {i|} it works.
I tested that with vscode and IJ.
Here th LSP trace:
Result: {
"isIncomplete": false,
"items": [
{
"label": "config:integer(propertyName : String) : Object",
"kind": 3,
"sortText": "Zcconfig:integer(propertyName : String) : Object",
"filterText": "config:integer",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "config:integer(${1:propertyName})$0"
}
},
{
"label": "config:property(propertyName : String) : Object",
"kind": 3,
"sortText": "Zcconfig:property(propertyName : String) : Object",
"filterText": "config:property",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "config:property(${1:propertyName})$0"
}
},
{
"label": "item_isLast",
"kind": 14,
"detail": "`isLast` - true if hasNext == false",
"sortText": "Zaitem_isLast",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_isLast"
}
},
{
"label": "str:fmt(ignoredPropertyName : String, format : String, args : Object...) : String",
"kind": 3,
"sortText": "Zcstr:fmt(ignoredPropertyName : String, format : String, args : Object...) : String",
"filterText": "str:fmt",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "str:fmt(${1:ignoredPropertyName}, ${2:format}, ${3:args})$0"
}
},
{
"label": "item_indexParity",
"kind": 14,
"detail": "`indexParity` - outputs `odd` or `even` based on the zero-based index value",
"sortText": "Zaitem_indexParity",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_indexParity"
}
},
{
"label": "item_count",
"kind": 14,
"detail": "`count` - 1-based index",
"sortText": "Zaitem_count",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_count"
}
},
{
"label": "str:fmt(ignoredPropertyName : String, locale : Locale, format : String, args : Object...) : String",
"kind": 3,
"sortText": "Zcstr:fmt(ignoredPropertyName : String, locale : Locale, format : String, args : Object...) : String",
"filterText": "str:fmt",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "str:fmt(${1:ignoredPropertyName}, ${2:locale}, ${3:format}, ${4:args})$0"
}
},
{
"label": "time:format(dateTimeObject : Object, pattern : String, locale : Locale) : String",
"kind": 3,
"sortText": "Zctime:format(dateTimeObject : Object, pattern : String, locale : Locale) : String",
"filterText": "time:format",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "time:format(${1:dateTimeObject}, ${2:pattern}, ${3:locale})$0"
}
},
{
"label": "item_index",
"kind": 14,
"detail": "`index` - zero-based index",
"sortText": "Zaitem_index",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_index"
}
},
{
"label": "config:boolean(propertyName : String) : Object",
"kind": 3,
"sortText": "Zcconfig:boolean(propertyName : String) : Object",
"filterText": "config:boolean",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "config:boolean(${1:propertyName})$0"
}
},
{
"label": "item_even",
"kind": 14,
"detail": "`even` - true if the zero-based index is even",
"sortText": "Zaitem_even",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_even"
}
},
{
"label": "items",
"kind": 18,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "items"
}
},
{
"label": "item_hasNext",
"kind": 14,
"detail": "`hasNext` - true if the iteration has more elements",
"sortText": "Zaitem_hasNext",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_hasNext"
}
},
{
"label": "item",
"kind": 18,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item"
}
},
{
"label": "time:format(dateTimeObject : Object, pattern : String) : String",
"kind": 3,
"sortText": "Zctime:format(dateTimeObject : Object, pattern : String) : String",
"filterText": "time:format",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "time:format(${1:dateTimeObject}, ${2:pattern})$0"
}
},
{
"label": "item_isFirst",
"kind": 14,
"detail": "`isFirst` - true if count == 1",
"sortText": "Zaitem_isFirst",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_isFirst"
}
},
{
"label": "inject:vertxRequest",
"kind": 5,
"sortText": "Zbinject:vertxRequest",
"filterText": "inject:vertxRequest",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "inject:vertxRequest"
}
},
{
"label": "time:format(dateTimeObject : Object, pattern : String, locale : Locale, timeZone : ZoneId) : String",
"kind": 3,
"sortText": "Zctime:format(dateTimeObject : Object, pattern : String, locale : Locale, timeZone : ZoneId) : String",
"filterText": "time:format",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "time:format(${1:dateTimeObject}, ${2:pattern}, ${3:locale}, ${4:timeZone})$0"
}
},
{
"label": "config:*(propertyName : String) : Object",
"kind": 3,
"sortText": "Zcconfig:*(propertyName : String) : Object",
"filterText": "config:*",
"insertTextFormat": 2,
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "config:${1:propertyName}$0"
}
},
{
"label": "item_odd",
"kind": 14,
"detail": "`odd` - true if the zero-based index is odd",
"sortText": "Zaitem_odd",
"textEdit": {
"range": {
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 3,
"character": 5
}
},
"newText": "item_odd"
}
}
]
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Qute completion request with the unclosed expression {i| and compare it with the working {i|} case, using the LSP completion trace provided in the issue. Trace the text edit and filtering behavior; done means completions are displayed correctly in both VS Code and IntelliJ for the unclosed expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100