mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-04 20:22: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
|
||||
" " file " " outfile)
|
||||
(.. "typst watch " file " "
|
||||
outfile))})]
|
||||
(term:toggle)
|
||||
(vim.uv.spawn :zathura {:args [outfile]}
|
||||
(fn [code signal] (term:shutdown)))))]
|
||||
outfile))})
|
||||
viewer-timer (vim.uv.new_timer)]
|
||||
(term:open)
|
||||
(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