Open landsman opened 6 months ago
From what I saw there is a need to write an IDE plugin to:
view
view
attribute values -> match them with fun
names and allow us to click, navigate to fun
definitionIt would be interesting to get rid of plain strings and use Kotlin reflection for actions. With that it would be 100% type-safe and easy to work with (cmd + click to navigate).
@landsman Yes, we would need to create a custom IntelliJ plugin for Thymeleaf.
I'm currently thinking to depreceate view:action
and replace it with a functional approach, in a larger application I did not think it was very useful.
https://github.com/wimdeblauwe/htmx-spring-boot/issues/104
I think this is much better than the string solution with the annotation processor, as you can easily navigate between the definition and the usage. This has been very important in my experience.
I see, yeah it would resolve this need for the plugin. Make sense.
Have you made up your mind? Are you going to release a new version? Can I help with updating the documentation or something?
I did not get around to it, but I still think it is a better approach. Creating an IntelliJ Plugin anyway would be still good for:
1. learn IDE proprietary attribute `view` 3. get rid of thymeleaf html comments which currently provide "import", code completion
Additionally defining ViewComponent Code templates: https://tschuehly.gitbook.io/server-side-spring-htmx-workshop#intellij-code-template
If you want to take a crack at an IntelliJ plugin that would be awesome.
Depreceating view:action would be a bigger rework, maybe I will have some time in June for that.
Yeah, I can take a look on the plugin.
Should I create a repo and add you as maintainer?
What about to do this as a module in this repository? It can be easier for the start I hope.
I've never developed a plugin so you can do that too if it's easier.
You can maybe take the jte plugin as example: https://github.com/casid/jte-intellij
I created a small IntelliJ plugin. I recommend using the template https://github.com/JetBrains/intellij-platform-plugin-template This will configure everything you need to publish the plugin to the marketplace later.
Do you have a way how to enable Code completion/syntax highlight in IDE?
Active plugins: