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

Not an editor command: PandocHighlight r | python #27

Open
wenjie1991 opened this issue Feb 13, 2020 · 3 comments
Open

Not an editor command: PandocHighlight r | python #27

wenjie1991 opened this issue Feb 13, 2020 · 3 comments
Labels

Comments

@wenjie1991
Copy link

The Nvim reports the following error while open the RMarkdown file:
image
After removing the corresponding lines (here and here), the errors disappeared. And the highlights seem normal.

@alerque alerque added bug and removed bug labels Feb 14, 2020
@alerque
Copy link
Member

alerque commented Feb 14, 2020

@wenjie1991 I think you have an issue with this plugin's dependencies and/or the order in which you load them. This plugin is dependent on both vim-pandoc and vim-pandoc-syntax. The syntax rules included here and meant to be an extensions of the ones in vim-pandoc-syntax. The PandocHighlight command that is causing you trouble here is defined over there.

Please let us know if that fixes it for you.

@wenjie1991
Copy link
Author

Hi @alerque, thanks for replying.
Yes, there are no errors when I enable the vim-pandoc-syntax plugin.
So my original question was solved.

However, it seems the enabling of the vim-pandoc-syntax plugin will disable the python block highlighting.
image
And the highlighting function is normal after disabling the vim-pandoc-syntax plugin.
image
It looks like that the vim-pandoc-syntax plugin has a higher priority.
Finally, I tried to trigger the highlighting of python block by setting:

let g:pandoc#syntax#codeblocks#embeds#langs = ["python", "r"]

@alerque
Copy link
Member

alerque commented Feb 14, 2020

Hmm, that legitimately looks like a bug. Running this plugin should enable those highlights by default. It kind of looks like the two implementations were done separately and have diverged. We should fix that, so I'm going to re-open this issue if you don't mind until there is a clean satisfactory fix.

@alerque alerque reopened this Feb 14, 2020
@alerque alerque added the bug label Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants