redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
43 stars 15 forks source link

Improve User tag snippet completion #784

Closed angelozerr closed 1 year ago

angelozerr commented 1 year ago

Take a sample with #form renarde user tag which have this content:

<form action="{it}" method="{method ?: 'POST'}" {#if class??}class="{class}"{/if} {#if id??}id="{id}"{/if}>
 {#authenticityToken/}
 {nested-content}
</form>

In a Qute template, when completion is opened it provide #form and when completion is applied it generates:

{#form /}

although #form expects some HTML content like <input, it should generate

{#form it }

{/form}

and better replace it with all uri, uriabs.

To do that we need to load the user tag content and

Another improvement which should be nice is to provide completion for parameters declared in user tag. Given this completion:

{#form uri.Login.manualLogin() | }

{/form}

It should show

//cc @FroMage