plantuml-previewer.vim
plantuml-previewer.vim copied to clipboard
Minimal hack for NixOS user and other that use standalone plantuml
Use plantuml package or make sure plantuml is callable in your terminal, then apply this
diff --git a/autoload/plantuml_previewer.vim b/autoload/plantuml_previewer.vim
index f48f143..712a9ff 100644
--- a/autoload/plantuml_previewer.vim
+++ b/autoload/plantuml_previewer.vim
@@ -23,10 +23,6 @@ let s:started = v:false
let s:extensions = get(g:, "plantuml_previewer#file_pattern", "*.pu,*.uml,*.plantuml,*.puml,*.iuml")
function! plantuml_previewer#start() "{{{
- if !executable(s:java_path())
- echoerr 'require java command'
- return v:false
- endif
let viewer_path = s:viewer_path()
if !isdirectory(viewer_path) && !filereadable(viewer_path)
call plantuml_previewer#copy_viewer_directory()
diff --git a/script/update-viewer.sh b/script/update-viewer.sh
index 521fe05..51f71d5 100755
--- a/script/update-viewer.sh
+++ b/script/update-viewer.sh
@@ -13,6 +13,6 @@ timestamp=${8}
update_js_path=${9}
include_path=${10}
-$java -Dapple.awt.UIElement=true -Djava.awt.headless=true -Dplantuml.include.path="$include_path" -jar "$jar_path" "$puml_src_path" -t$image_type -o "$output_dir_path"
+plantuml "$puml_src_path" -t$image_type -o "$output_dir_path"
cp "$output_path" "$finial_path"
echo "window.updateDiagramURL('$timestamp')" > "$update_js_path"