qjebbs / vscode-plantuml

Rich PlantUML support for Visual Studio Code.
MIT License
1.08k stars 155 forks source link

Question/clarification: How to use includepaths? #437

Open chipbite opened 2 years ago

chipbite commented 2 years ago

Hi, I am trying to use includepaths setting (using server render). My diagram !includes work for (a) current (diagram sourcefile) dir, (b) relative to that sourcefile dir but I cannot get includes (c) relative to the project root to work.

It all works fine when I use "local jar-file" render, but not when using server render.

So, I tried setting up plantuml.includepaths, but I cannot get it to fix the issue. I have tried:

/docs/
docs/
docs

( e g "plantuml.includepaths": [ "/docs/" ] )

(I am using win10.)

Thanks for a great plugin!

BR! /marcus

chipbite commented 2 years ago

So if I understand it correctly, project relative references do not work. The includepaths must be global.

https://github.com/qjebbs/vscode-plantuml/issues/375#issuecomment-773036980

vitalyzhakov commented 2 years ago

@chipbite , hello!

I have try to include file by relative path by instruction https://github.com/qjebbs/vscode-plantuml#include-files-search-logic

!include "./../lib/rsm.puml"

and have error

cannot include "./../lib/rsm.puml"

Do you mean, this way does not work now?

Florin-Popescu commented 2 years ago

Hello!

I still do not fully understand. Do paths relative to project/vscode workspace root not work in the includepaths setting? In the readme of the project the path suggestions look relative to me: "plantuml.includepaths": ["docs/diagrams/style","docs/diagrams/src"]

But for me it doesn't work unless I put absolute paths there.

yorgoA commented 2 months ago

Hello i am also encountering this problem , the only way for the !include style_sheet.iuml to work is if it is in the same directory of duplicate_record.puml file , I can not add relative paths such as !include ../style_sheet.iuml Duplicate records

yorgoA commented 2 months ago

I also tested with both files in .puml instead of one in .puml and another in .iuml but the issue remains