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

[help wanted] Can not work in vue files (Already configured) #162

Closed niuiic closed 3 years ago

niuiic commented 3 years ago

Hi, I have configured for vue files accroding to #107。But it seems that the plugin failed to work.

My configuration.

    \       'vue' : {
    \           'parentheses': ['start=/{/ end=/}/ fold contains=@javaScript containedin=@javaScript', 'start=/(/ end=/)/ fold contains=@javaScript containedin=@javaScript', 'start=/\v\<((script|style|area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
    \       }

neovim version

$ nvim -v         
NVIM v0.4.4
Build type: Gentoo
Lua 5.1
Compilation: /usr/lib/ccache/bin/clang -march=native -O2 -pipe -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/config -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4/src -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.4.4-r100/work/neovim-0.4.4_build/include
Compiled by portage@localhost

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "/etc/vim/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Before configuration

image

After configuration(It works in html code, but not in js code) image

It works well in other file types.

These could be helpful.

image image image image image

luochen1990 commented 3 years ago

because <script> is a special tag in HTML, and vim's default syntax file did some special things to them...

Maybe the trouble shooting section in README can help

niuiic commented 3 years ago

I'm sorry, I don't quite understand those things in trouble shooting.

I have tried a few times and found that it doesn’t work at all.

And this configurations works in #107. Is this the difference between vim and neovim?

image

niuiic commented 3 years ago

I found that my vue syntax highlighting plugin interfered with syntax highlighting. And rainbow would not work in vue files, both in html codes and js codes.

Then I have to give up using rainbow in the vue file whether or not the above problem is solved.

I feel a little sorry, and thank you for your help.