From d281c79dee806b2370b7ea193cfe6ed55ab6d240 Mon Sep 17 00:00:00 2001 From: Vo Quang chien Date: Fri, 8 Nov 2024 09:09:27 +0700 Subject: [PATCH] chore(typst): add comments and simplify code --- lua/lazyvim/plugins/extras/lang/typst.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typst.lua b/lua/lazyvim/plugins/extras/lang/typst.lua index 58868230..1940a526 100644 --- a/lua/lazyvim/plugins/extras/lang/typst.lua +++ b/lua/lazyvim/plugins/extras/lang/typst.lua @@ -17,10 +17,8 @@ return { opts = { servers = { tinymist = { - single_file_support = true, - root_dir = function() - LazyVim.root.get() - end, + single_file_support = true, -- Fixes LSP attachment in non-Git directories + root_dir = LazyVim.root.get, settings = { formatterMode = "typstyle", }, @@ -44,7 +42,7 @@ return { cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" }, build = function(plugin) local typst_preview = require("typst-preview") - typst_preview.setup(plugin.opts) + typst_preview.setup(plugin.opts) -- Setup preview during build to avoid redundant downloads typst_preview.update() end, keys = { @@ -52,7 +50,7 @@ return { "cp", ft = "typst", "TypstPreviewToggle", - desc = "Typst Preview", + desc = "Toggle Typst Preview", }, }, opts = {