develar / d2-intellij-plugin

IntelliJ Plugin for D2 (modern language that turns text to diagrams)
https://plugins.jetbrains.com/plugin/20630-d2
Apache License 2.0
18 stars 4 forks source link

Preview not refreshing #58

Open hpr1999 opened 6 months ago

hpr1999 commented 6 months ago

Hi there!

Trying out the plugin, it seems nice to write the d2 source in, but the preview doesn't seem to work properly for me.

When opening a file, it compiles and previews fine, but changes are not detected and logged in the d2 compilation output.

Note: it's not just the internal browser updating, connecting to the internal watch process via a normal browser also does not show the updates.

What's strange: if I use the d2-cli's watch mode manually on an external terminal and then edit the file in the same way in IntelliJ, changes get detected and recompilation is triggered. Now obviously this way I can't use the auto-preview in IntelliJ, which is sad.

I can force an update by first using Ctrl+S to save the file in IntelliJ and then changing some settings of the compilation, e.g. the layout engine.

I'm using IntelliJ 2024.1.2 Ultimate on Windows 10.

Thanks for your efforts.