weirongxu / plantuml-previewer.vim

Vim / Neovim plugin for preview PlantUML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I set `!include` to work with working directory?

cprn opened this issue · comments

commented

I tried to set g:plantuml_previewer#viewer_path to working directory but it doesn't copy index.html there because the directory already exists. In that case I don't understand how to make !include work when multiple diagrams share definitions.

Directory content:

.
├── shared.puml
└── main.puml

shared.puml:

actor a as "**Bank's Customer**\n\n//Description translated to many languages.//"
rectangle b as "**Local Bank**\n\n//Description also translated to many languages.//"

main.puml:

@startuml
!include shared.puml
a -> b
@enduml

Opening main.puml in VIM and calling :PlantumlOpen without setting the #viewer_path generates this error:

image

With #viewer_path set to current directory calling :PlantumlOpen makes browser complain it cannot find index.html.

Fixed in the latest version.

Unless you want to change the viewer directory, don't need to set the #viewer_path