redhat-developer / intellij-quarkus

IntelliJ Quarkus Tools
Eclipse Public License 2.0
114 stars 44 forks source link

Code completion in Qute template #1341

Open simasch opened 3 weeks ago

simasch commented 3 weeks ago

I'm using the IntelliJ Quarkus Tools 1.30.1 with a Qute example project: https://github.com/mkouba/qute-insights

I can navigate from the HelloResource to the template hello.html, but in the hello.html, I have absolutely no code completion, and I also cannot navigate from an expression to the resource:

image

I opened this issue because I didn't find any detailed information about the Qute features.

I'm using IntelliJ IDEA 2024.1.2 (Ultimate Edition) Build #IU-241.17011.79, built on May 22, 2024

maxandersen commented 3 weeks ago

Have you isntgalled the actual Quarkus Tools or using the quarkus tools that comes with Ultimate edition ? those are NOT the same.

simasch commented 3 weeks ago

I have installed both

image
simasch commented 3 weeks ago

And if I disable the Jetbrains Quarkus plugin it works!

angelozerr commented 3 weeks ago

@simasch if you open completion in a text node of your html have you completion for #for?

If yes it means that Qute Language Server is started correctly and in this case have you some Java compilation problems?

To check that your Qute Language Server is started could you click on Language Server View which should be available on bottom left of your IJ and see the status of the server.

As you are using IU perhaps there is some conflitcts with Qute support of Jetbrains.

If you rename your .html file extension with .qute.html is it working better?

angelozerr commented 3 weeks ago

And if I disable the Jetbrains Quarkus plugin it works!

Thats great but it means that IJ Ultimate Quarkus support overrides our Qute Language file type, it is very annoying

simasch commented 3 weeks ago

@angelozerr Yes, it is!

angelozerr commented 3 weeks ago

@angelozerr Yes, it is!

Thanks for your feedback! Hope you will enjoy with our Qute support.

maxandersen commented 3 weeks ago

@angelozerr does intellij have ways for users to override the override? otherwise we shuold ping intellij team on finding ways to have the extensions play nice.

angelozerr commented 3 weeks ago

@angelozerr does intellij have ways for users to override the override? otherwise we shuold ping intellij team on finding ways to have the extensions play nice.

To be honnest with you I dont know. But I think the best solution is to use in IJ Quarkus the Qute file type from IJ Ultimate if user uses Ultimate. In this case IJ Quarkus will use the Qute parser from Ultimate which manage better the syntax coloration for instance than IJ Quarkus.

In the past it was not possible but we have improved a lot our LSP support with https://plugins.jetbrains.com/plugin/23257-lsp4ij/edit and it should be easier now.

Perhaps I miss some another problem but I think it could be interested to try to do that.

@fbricon what do you think about this idea?

fbricon commented 3 weeks ago

@angelozerr I think it's worth it. It's annoying to see Ultimate degrade our superior Qute tooling

simasch commented 2 weeks ago

I disabled the IntelliJ Quarkus plugin. However, if I do that, I can no longer run the tests from IntelliJ, as IntelliJ no longer finds the test dependencies.

I don't get compilation error in the editor.

angelozerr commented 2 weeks ago

@simasch I'm busy with the release of our LSP support for IntelliJ that we use in IJ Quarkus, but I will try to study how to support IJ Quarkus / Jetbrains Quarkus together after the release.

simasch commented 2 weeks ago

I made another observation: When creating a new project with Quarkus tools, IntelliJ doesn't recognize the project as a Maven project.

angelozerr commented 2 weeks ago

I made another observation: When creating a new project with Quarkus tools, IntelliJ doesn't recognize the project as a Maven project.

That s strange please create a new issue