feat(neovim): install pandoc

This commit is contained in:
Barrett Ruth 2026-03-01 17:38:08 -05:00
parent 339840a602
commit bfa0f77296
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 47 additions and 1 deletions

View file

@ -1,2 +1,33 @@
vim.o.conceallevel = 1
vim.o.textwidth = 80
local buf = vim.api.nvim_get_current_buf()
local opened = false
vim.api.nvim_create_autocmd('User', {
pattern = 'RenderCompileSuccess',
callback = function(args)
if args.data.bufnr ~= buf then
return
end
local html = args.data.output
if not opened and html and html ~= '' then
opened = true
vim.system({ 'xdg-open', html })
end
end,
})
vim.api.nvim_create_autocmd('BufWritePost', {
buffer = buf,
callback = function()
local ok, render = pcall(require, 'render')
if ok then
render.compile(buf)
end
end,
})
vim.keymap.set('n', '<leader>t', function()
require('render').compile(buf)
end, { buffer = true })