feat: add typst support

This commit is contained in:
Fabrice Mouhartem 2024-10-11 10:50:29 +02:00
parent 6a6243fd90
commit 22e70f9725
Signed by: fmouhart
GPG Key ID: 2C5033B228CFE4E7
3 changed files with 21 additions and 0 deletions

View File

@ -60,3 +60,15 @@ vim.api.nvim_create_autocmd("FileType", {
require('spelling').spell_keymap() require('spelling').spell_keymap()
end, end,
}) })
-- Typst bindings
local typstgroup = vim.api.nvim_create_augroup("typst", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
pattern = { "typst" },
group = typstgroup,
callback = function()
vim.keymap.set('', '<LocalLeader>mp', ':TypstWatch<CR>', { noremap = true, silent = true, desc = "[M]ake [P]review" })
require('spelling').spell_keymap()
end,
})

View File

@ -301,5 +301,10 @@ require('lazy').setup({
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown", "pandoc" }, ft = { "markdown", "pandoc" },
build = function() vim.fn["mkdp#util#install"]() end, build = function() vim.fn["mkdp#util#install"]() end,
},
{
'kaarmu/typst.vim',
ft = 'typst',
lazy = false,
} }
}, {}) }, {})

View File

@ -96,6 +96,7 @@ local servers = {
'norg', 'norg',
'gitcommit', 'gitcommit',
'rst', 'rst',
'typst'
}, },
ltex = { ltex = {
language = "auto", language = "auto",
@ -118,6 +119,9 @@ local servers = {
} }
} }
}, },
tinymist = {
exportPdf = "onType",
},
lua_ls = { lua_ls = {
Lua = { Lua = {
workspace = { checkThirdParty = false }, workspace = { checkThirdParty = false },