feat(extras): lang typst

Adds [`typst`](https://typst.app) support with preview.
This commit is contained in:
Jose Storopoli 2024-09-14 05:31:18 -03:00
parent 3dbace941e
commit 2c3103a04a
No known key found for this signature in database
GPG key ID: 29E00111DE172C28

View file

@ -0,0 +1,35 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = { "typst" },
})
end,
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "typst" } },
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
typst_lsp = {},
},
},
},
-- Typst preview
{
"chomosuke/typst-preview.nvim",
ft = "typst",
build = function()
require("typst-preview").update()
end,
keys = {
{
"<leader>cp",
ft = "typst",
"<cmd>TypstPreviewToggle<cr>",
desc = "Typst Preview",
},
},
},
}