-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion should generate only start section when empty end section is found #807
Completion should generate only start section when empty end section is found #807
Conversation
b14465a
to
7b32952
Compare
@JessicaJHee here a new PR which do the samething than PR #806 but without updating end tag section (since |
61972cb
to
2b9b3a1
Compare
The code of this PT should be clean, you can review it. |
ab20be8
to
aa225e6
Compare
I have improved template parser to take care of this usecase. Please retry it. |
aa225e6
to
aa7fb25
Compare
@JessicaJHee could you check if it is working with surround please. |
aa7fb25
to
df09e4a
Compare
Given the following template:
If I select between the two |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works well with surround with command! Thank you for writing lots of tests :)
8b63171
to
cc64bdb
Compare
According this comment it is not a good idea to change the behavior of the parser. I revert my change and to fix the original issue {#each items}
{#|}
{/} which didn't generate the full content of the snippet (only the first part of the section), I check if parent section of {# is closed. In this case, #each is not closed because the @datho7561 please retry it and I suggest that you get redhat-developer/vscode-quarkus#585 to play with surround too. |
Seems pretty good so far, I'm going to try it out with redhat-developer/vscode-quarkus#585 and see how that goes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works very well. I found a few spots where the code could be cleaned up a bit, but nothing major. Feel free to merge after you've addressed the comments.
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/parser/template/Section.java
Outdated
Show resolved
Hide resolved
...e.ls/src/main/java/com/redhat/qute/services/completions/tags/QuteSnippetContentProvider.java
Outdated
Show resolved
Hide resolved
...e.ls/src/main/java/com/redhat/qute/services/completions/tags/QuteSnippetContentProvider.java
Outdated
Show resolved
Hide resolved
...e.ls/src/main/java/com/redhat/qute/services/completions/tags/QuteSnippetContentProvider.java
Outdated
Show resolved
Hide resolved
...e.ls/src/main/java/com/redhat/qute/services/completions/tags/QuteSnippetContentProvider.java
Outdated
Show resolved
Hide resolved
cc64bdb
to
c408566
Compare
found Fixes redhat-developer#805 Signed-off-by: azerr <azerr@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks, Angelo!
Generate only start section when empty end section is foundCompletion should generate only start section when empty end section is found
Fixes #805
Signed-off-by: azerr azerr@redhat.com