nVim/ftplugin/typst.lua
Robert Morrison 304ea02edd feat(lsp): Add support for typst
Add support for handling Typst files.
2025-12-21 20:43:30 +00:00

13 lines
320 B
Lua

vim.wo.spell = true
vim.bo.textwidth = 75
vim.wo.colorcolumn = "75,80"
vim.api.nvim_buf_create_user_command(0, "OpenPdf", function()
local filepath = vim.api.nvim_buf_get_name(0)
if filepath:match("%.typ$") then
local pdf_path = filepath:gsub("%.typ$", ".pdf")
vim.system({ "xdg-open", pdf_path })
end
end, {})