asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
326 stars 98 forks source link

Asciidoc: Use_kroki setting change only effective after restarting VS code #444

Closed rogierhofboer closed 2 years ago

rogierhofboer commented 2 years ago

Description

Changes of the Use_kroki setting are only effective after restarting VS code.

Environment

AsciiDoc v2.8.9

To Reproduce

Create an asciidoc with an embedded diagram. Check Asciidoc: Use_asciidoctor_js Uncheck: Asciidoc: Use_kroki Restart VS code Preview the asciidoc (no diagrams should be rendered) Check: Asciidoc: Use_kroki Refresh the preview (diagrams should be rendered, but are not rendered) Restart VS code Refresh the preview (diagrams are rendered,)

danyill commented 2 years ago

Thanks for filing this issue. I see :eyes: the problem and it does seem rather irksome.

Currently we're registering the kroki extension as a top level directive, so when the configuration settings are modified, there is no change being propagated.

https://github.com/asciidoctor/asciidoctor-vscode/blob/74bce1d292f36a1672d6df608d1aa4d1e8a85720/src/text-parser.ts#L8-L17

I think I can fix this. PR soon.

rasmusmk commented 2 years ago

Add option to use local or internal kroki server

ggrossetie commented 2 years ago

Please do not comment on a closed issue about a feature you've already asked: https://github.com/asciidoctor/asciidoctor-vscode/issues/480