rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

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

Open draftman9 opened this issue 2 years ago • 6 comments

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

draftman9 avatar Aug 26 '23 04:08 draftman9

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

luochen1990 avatar Aug 26 '23 06:08 luochen1990

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()

draftman9 avatar Aug 31 '23 12:08 draftman9

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

luochen1990 avatar Aug 31 '23 15:08 luochen1990

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.

draftman9 avatar Aug 31 '23 15:08 draftman9

Have you tried :RainbowToggleOn ?

luochen1990 avatar Sep 01 '23 13:09 luochen1990

Have you tried :RainbowToggleOn ?

image

Yes I tried when I only installed the Rainbow plugin.

draftman9 avatar Sep 03 '23 04:09 draftman9