nvim: autostart knap for tex and markdown

master
tiyn 12 months ago
parent 1506e2c559
commit c53e936f73

@ -1,11 +1,16 @@
vim.api.nvim_create_autocmd({ 'BufEnter' },
{
callback = function() vim.o.foldenable = false end
callback = function()
vim.o.foldenable = false
require("knap").toggle_autopreviewing()
end
})
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
callback = function() os.execute('mdclear ' .. vim.fn.expand('%')) end
callback = function()
os.execute('mdclear ' .. vim.fn.expand('%'))
end
})
vim.o.shiftwidth = 2

@ -1,6 +1,15 @@
vim.api.nvim_create_autocmd({ 'BufEnter' },
{
callback = function()
require("knap").toggle_autopreviewing()
end
})
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
callback = function() os.execute('texclear ' .. vim.fn.expand('%')) end
callback = function()
os.execute('texclear ' .. vim.fn.expand('%'))
end
})
vim.o.shiftwidth = 2

Loading…
Cancel
Save