mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-05 03:22:32 +01:00
mzte-nv: completely implement :TypstWatch command
This commit is contained in:
parent
595680ef81
commit
220086dbde
1 changed files with 9 additions and 3 deletions
|
@ -14,8 +14,14 @@
|
||||||
(.. "typst watch --root " root
|
(.. "typst watch --root " root
|
||||||
" " file " " outfile)
|
" " file " " outfile)
|
||||||
(.. "typst watch " file " "
|
(.. "typst watch " file " "
|
||||||
outfile))})]
|
outfile))})
|
||||||
|
viewer-timer (vim.uv.new_timer)]
|
||||||
(term:toggle)
|
(term:toggle)
|
||||||
(vim.uv.spawn :zathura {:args [outfile]}
|
(viewer-timer:start 2000 0
|
||||||
(fn [code signal] (term:shutdown)))))]
|
(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}))
|
(vim.api.nvim_create_user_command :TypstWatch cb {:nargs 0}))
|
||||||
|
|
Loading…
Reference in a new issue