redhat-developer / quarkus-ls

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

Properties should be available recursively #939

Open gbourant opened 9 months ago

gbourant commented 9 months ago

Assume you have 3 tags:

  1. inputLabelText.html

       {#inputLabel /}
       {#inputText  /}
  2. inputLabel.html

    <label {#if for??}for="{for}"{/if}>
        {title??}
    </label>
  3. inputText.html

    <input {#if value??}value="{value}"{/if} />

So when the inputLabelText.html is used {#inputLabelText /} the properties of the other tags are not available for auto completion.

angelozerr commented 9 months ago

If I understansd you can write

{#inputLabelText title="foo" /}

Are you sure with that?

gbourant commented 9 months ago

Yeap, it seems that it doesn't work.

You can see the attached imaged but also i updated the project here. SC_20230918_102335_23805

Also, I do not know if this relevant to this project but the highlight breaks when the property value has a space.

angelozerr commented 9 months ago

I didnt' know that we could write this kind of user tag. That's very strange because if title has different type from different user tag you will have some error.

@mkouba is it an expected behavior?

Also, I do not know if this relevant to this project but the highlight breaks when the property value has a space.

I think it is a bug from our Qute parser, we need to fix it.

Those 2 issues comes from the Qute Language Server and are not linked to IJ himself (I mean that we will have the same problem for vscode and Eclipse IDE)

angelozerr commented 9 months ago

@gbourant I moved your issue in quarkus-ls github project since your 2 issues comes from Qute LS.

mkouba commented 9 months ago

@mkouba is it an expected behavior?

I'm not quite sure what behavior do you mean?

I don't think that args/parameters of a user tag should be validated at all because tags that are not executed in isolation can access data from the parent context.

Note that in Quarkus 3.5 there's a breaking change - a user tag is now executed as an isolated template by default (unlike in previous versions).