weirongxu / plantuml-previewer.vim

Vim / Neovim plugin for preview PlantUML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add the ability to choose plantuml.jar location as a global variable

dylan-chong opened this issue · comments

So the user can install plant uml as a package from their own package manager , and be able to consistently use that jar

g:plantuml_previewer#plantuml_jar_path is implemented in the latest version

Thank you!

This appears to be broken for me. Are you able to replicate? let g:plantuml_previewer#plantuml_jar_path = system("cat which plantuml | grep -w 'plantuml.jar' | perl -pe 's/.* (\\S+plantuml\\.jar).*/\\1/'") (if you installed plantuml through homebrew). Even hardcoding the value /usr/local/Cellar/plantuml/1.2018.3/libexec/plantuml.jar for me

Custom plantuml path not breaked me,

This my plantuml version

let g:plantuml_previewer#plantuml_jar_path = "/usr/local/Cellar/plantuml/1.2018.6/libexec/plantuml.jar"

Oops. found the problem!

The first part was my system call returned the path with a \n at the end. The second part was that the safari console shows errors after calling :PlantumlOpen but before the diagram has been generated yet.

I've put my fixed code here https://github.com/weirongxu/plantuml-previewer.vim/pull/12/files