nVim/ftplugin/typst.lua
Robert Morrison 0d623139fa fix: Make colorcolumn work properly
Setting `colorcolumn` as a window option breaks any window
that does not need it set.
Use an autocmd to fix this.
2026-04-09 20:25:43 +01:00

12 lines
291 B
Lua

vim.wo.spell = true
vim.bo.textwidth = 75
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, {})