pin typst

This commit is contained in:
Christoph J. Scherr 2024-09-04 10:12:12 +02:00
parent 69b08e4234
commit 044dc613c8
1 changed files with 14 additions and 0 deletions

View File

@ -79,3 +79,17 @@ vim.api.nvim_create_autocmd('ColorScheme', {
vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments
end, end,
}) })
-- pin main.typ for typst projects
vim.api.nvim_create_autocmd('FileType', {
group = augroup,
pattern = {
'typst',
},
callback = function()
-- pin the main file
vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { vim.api.nvim_buf_get_name(0) } }
-- -- unpin the main file
-- vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { nil } }
end,
})