mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-05 03:42:33 +01:00
mzte-nv: completely implement :TypstWatch command
This commit is contained in:
parent
595680ef81
commit
14237e56fa
1 changed files with 10 additions and 4 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))})
|
||||||
(term:toggle)
|
viewer-timer (vim.uv.new_timer)]
|
||||||
(vim.uv.spawn :zathura {:args [outfile]}
|
(term:open)
|
||||||
(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}))
|
(vim.api.nvim_create_user_command :TypstWatch cb {:nargs 0}))
|
||||||
|
|
Loading…
Reference in a new issue