mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-04 20:42: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
|
||||
" " 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}))
|
||||
|
|
Loading…
Reference in a new issue