From 35e545378a93eb427214a4ad2aadf327742b2d26 Mon Sep 17 00:00:00 2001 From: Vo Quang Chien Date: Mon, 15 Jul 2024 10:43:37 +0700 Subject: [PATCH] feat(lang): add Typst language support --- lua/lazyvim/plugins/extras/lang/typst.lua | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/typst.lua diff --git a/lua/lazyvim/plugins/extras/lang/typst.lua b/lua/lazyvim/plugins/extras/lang/typst.lua new file mode 100644 index 00000000..2bbc7ab3 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/typst.lua @@ -0,0 +1,53 @@ +return { + recommended = function() + return LazyVim.extras.wants({ + ft = { "typst" }, + }) + end, + + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "typst" }, + }, + }, + + -- Wait until this package is available in the mason-registry + -- { + -- "williamboman/mason.nvim", + -- opts = { + -- ensure_installed = { "typstyle" }, + -- }, + -- }, + + { + "neovim/nvim-lspconfig", + opts = { + servers = { + tinymist = {}, + }, + }, + }, + + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + typst = { "typstyle" }, + }, + }, + }, + + { + "chomosuke/typst-preview.nvim", + cmd = { "TypstPreview" }, + build = function() + require("typst-preview").update() + end, + opts = { + dependencies_bin = { + ["typst-preview"] = "tinymist", + }, + }, + }, +}