I dunno if this has been said before, but I'll just put it here:
When GoyoLeave, check for filetype and source the syntax file (this can be converted to vimscript)
function au(evt, pat, cmd) -- (string|table), (string|table), (string)
vim.api.nvim_create_autocmd(evt, { pattern = pat, command = cmd, })
end
au("User", "GoyoLeave", [[if &filetype == "markdown" | source /Users/deangao/.config/nvim/syntax/markdown.vim | endif]])
au("User", "GoyoLeave", [[if &filetype == "nroff" | source /Users/deangao/.config/nvim/syntax/nroff.vim | endif]])
I dunno if this has been said before, but I'll just put it here: When GoyoLeave, check for filetype and source the syntax file (this can be converted to vimscript)