Compare commits

...

1 commit

Author SHA1 Message Date
220086dbde
mzte-nv: completely implement :TypstWatch command 2024-11-18 07:52:07 +01:00

View file

@ -14,8 +14,14 @@
(.. "typst watch --root " root
" " file " " outfile)
(.. "typst watch " file " "
outfile))})]
outfile))})
viewer-timer (vim.uv.new_timer)]
(term:toggle)
(vim.uv.spawn :zathura {:args [outfile]}
(fn [code signal] (term:shutdown)))))]
(viewer-timer:start 2000 0
(fn []
(viewer-timer:stop)
(viewer-timer:close)
(vim.uv.spawn :zathura {:args [outfile]}
(fn [code signal]
(vim.schedule #(term:shutdown))))))))]
(vim.api.nvim_create_user_command :TypstWatch cb {:nargs 0}))