luochen1990 / rainbow

Rainbow Parentheses Improved, shorter code, no level limit, smooth and fast, powerful configuration.
Apache License 2.0
1.78k stars 95 forks source link

[Bug] does not work well in the codeblock of markdown file #189

Open draftman9 opened 1 year ago

draftman9 commented 1 year ago

Describe the bug

I code some python codes in the codeblock of markdown. But the rainbow plugin did not work in the area.

To Reproduce

  1. create a test.md
  2. code some python codes in the codeblock

File: test.md`, filetype=markdown

a=1
b=[1,2,[2,3]]
print(a,b(2))

Expected behavior

The ( and [ should be different colors.

Screenshots

image

Additional context

And I found the math environment has the same problem. image

luochen1990 commented 1 year ago

Are you using some 3rd party plugin for markdown highlighting?

draftman9 commented 1 year ago

Are you using some 3rd party plugin for markdown highlighting?

Maybe. I filtered some plugins( does not work well when I install these plugins):

call plug#begin('~/vimfiles/plugged')

Plug 'godlygeek/tabular'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install'  }
Plug 'lervag/vimtex'
Plug 'KeitaNakamura/tex-conceal.vim'
Plug 'sheerun/vim-polyglot'
Plug 'luochen1990/rainbow'

call plug#end()
luochen1990 commented 1 year ago

Seems like 'iamcco/markdown-preview.nvim' did some trick to markdown syntax, maybe you can check it out via the troubleshooting tools in README

draftman9 commented 1 year ago

Seems like 'iamcco/markdown-preview.nvim' did some trick to markdown syntax, maybe you can check it out via the troubleshooting tools in README

I do not know what is troubleshooting. And I only installed the Rainbow plugin by commenting other all plugins. But it still does not work in the .md file.

luochen1990 commented 1 year ago

Have you tried :RainbowToggleOn ?

draftman9 commented 1 year ago

Have you tried :RainbowToggleOn ?

image

Yes I tried when I only installed the Rainbow plugin.