asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
322 stars 97 forks source link

Add a new setting to configure the URL of the Kroki server #480

Open rasmusmk opened 2 years ago

rasmusmk commented 2 years ago

Possibility to send kroki generation to local server/port and maybe a selection to use cloud if no local response

frankbenoit commented 1 year ago

I find this really important for use at work. It is not acceptable by the company that internals go to a public server. On the other hand, asciidoc is important for technical documentation. To see e.g. plantuml in the preview, I use then AsciidocFx, mainly for this use case only. The alternative, setting :kroki-server-url: in each document seems also not a good approach, nor does it work for me. Please support this as a setting in the asciidoc vs code plugin.

ggrossetie commented 1 year ago

Kroki is disabled by default and you can configure the server using the kroki-server-url attribute from the extension settings:

image

image

ggrossetie commented 1 year ago

With the upcoming support of the Asciidoctor Config File, you will also be able to set the kroki-server-url attribute in an .asciidoctorconfig file. See: https://github.com/asciidoctor/asciidoctor-vscode/pull/636

ggrossetie commented 1 year ago

I'm willing to provide a new setting to set the Kroki URL similar to what the Intellij IDEA plugin does:

image

ggrossetie commented 1 year ago

and maybe a selection to use cloud if no local response

I don't think that's a good idea for privacy reasons. As mentioned by @frankbenoit, it might not be acceptable to send diagrams to a public server.

nolange commented 1 year ago

I would be welcoming this setting aswell, it should take preference over a ASCII Doctor Config file for the preview.