Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to syntax highlighting breaking (in lua) #269

Open
gaoDean opened this issue Aug 16, 2022 · 0 comments
Open

Fix to syntax highlighting breaking (in lua) #269

gaoDean opened this issue Aug 16, 2022 · 0 comments

Comments

@gaoDean
Copy link

gaoDean commented Aug 16, 2022

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]])
@gaoDean gaoDean changed the title Fix to syntax highlighting breaking Fix to syntax highlighting breaking (in lua) Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant