From 297445343d79a324972cd786d120f1fd5ce465f6 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Fri, 15 Nov 2024 20:33:25 +0900 Subject: [PATCH] new(nvim): add typst-preview.nvim with customization to modify --root for typst --- dotfiles/neovim/init.lua | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 24b870f..daf7440 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -279,6 +279,65 @@ require('lazy').setup({ }) end, }, + { + 'chomosuke/typst-preview.nvim', + ft = 'typst', + version = 'v1.*', + build = function() + require 'typst-preview'.update() + end, + config = function() + require 'typst-preview'.setup { + -- Setting this true will enable printing debug information with print() + debug = false, + + -- Custom format string to open the output link provided with %s + -- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview' + open_cmd = nil, + + -- Setting this to 'always' will invert black and white in the preview + -- Setting this to 'auto' will invert depending if the browser has enable + -- dark mode + -- Setting this to '{"rest": "