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

Adding 'markdown' to g:markdown_fenced_languages results in lots of errors #217

Open
scy opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@scy
Copy link

scy commented Oct 9, 2024

I'm documenting a Markdown-based software, and thus I have fenced code blocks that start with ```markdown.

When I try to add 'markdown' to the list in g:markdown_fenced_languages, Vim (and Neovim) eats a lot of CPU for a second, then throws a lot of errors at me:

Error detected while processing /usr/share/nvim/runtime/syntax/markdown.vim:                                                             
line   29:                                                                                                                               
E847: Too many syntax includes                                                                                                           
line   31:                                                                                                                               
E121: Undefined variable: s:done_include                                                                                                 
line  105:                                                                                                                               
E121: Undefined variable: main_syntax                                                                                                    
line  165:                                                                                                                               
E121: Undefined variable: main_syntax                                                                                                    
line   31:                                                                                                                               
E121: Undefined variable: s:done_include                                                                                                 
line  105:                                                                                                                               
E121: Undefined variable: main_syntax
[…]

I assume I've hit some kind of infinite recursion.

Initializing s:done_include with {'markdown': 1} in syntax/markdown.vim (so that it won't try to include itself) gets rid of the errors, but also doesn't give me any syntax highlighting inside of ```markdown blocks.

I'm using the bundled version of this plugin, with the syntax file being tagged Last Change: 2020 Jan 14.

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