From 59f670d673111ba49494c93b36092b0b354b026b Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Tue, 19 Aug 2025 10:45:38 +0200 Subject: [PATCH] feat(plugins): Add typst-preview --- lazy-lock.json | 1 + lua/autocommands.lua | 2 +- lua/plugins-configure.lua | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1ee566e..e53e835 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -35,6 +35,7 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope.nvim": { "branch": "0.1.x", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" }, "typst.vim": { "branch": "main", "commit": "323539709e29a537ff39dfce6c05f175a8921504" }, "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" }, "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, diff --git a/lua/autocommands.lua b/lua/autocommands.lua index 8fbadfc..6e16e8b 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -63,7 +63,7 @@ vim.api.nvim_create_autocmd("FileType", { pattern = { "typst" }, group = typstgroup, callback = function() - vim.keymap.set('', 'mp', ':TypstWatch', { noremap = true, silent = true, desc = "[M]ake [P]review" }) + vim.keymap.set('', 'mp', ':TypstPreview', { noremap = true, silent = true, desc = "[M]ake [P]review" }) vim.o.spell = true spell_keymap() vim.o.spelllang = "fr,en" diff --git a/lua/plugins-configure.lua b/lua/plugins-configure.lua index fd24228..264168a 100644 --- a/lua/plugins-configure.lua +++ b/lua/plugins-configure.lua @@ -369,6 +369,16 @@ require('lazy').setup({ ft = 'typst', lazy = false, }, + { + 'chomosuke/typst-preview.nvim', + lazy = false, -- or ft = 'typst' + version = '1.*', + opts = { + dependencies_bin = { + ['tinymist'] = 'tinymist' + } + }, -- lazy.nvim will implicitly calls `setup {}` + }, -- oil.nvim { 'stevearc/oil.nvim',