-
Notifications
You must be signed in to change notification settings - Fork 387
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
Compatibility with luochen1990/rainbow #1672
Comments
Strange. It works for me. But in a minimal example, it does not work quite as expected. |
Ok, sorry, I've created a minimal example that works just as expected, see here: set nocompatible
let &runtimepath = '~/.vim/bundle/rainbow,' . &runtimepath
let &runtimepath = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
nnoremap q :qall!<cr>
let g:rainbow_active = 1 and \documentclass{minimal}
\begin{document}
Hello World! (((()))) {{{{{}}}}}
\end{document} With |
Ah, I see. This is reproducible, but it is not a vimtex issue. Instead, this is caused by the syntax plugin which comes with Vim/neovim. The problem is due to the tex syntax that specifically matches parantheses inside sections and curly braces in general. Not sure if it is possible to do anything about it. |
FYI: in my minimal example, if I set the filetype manually to plaintex, it works... for both () and {} in both lines 4 and 8... |
Yes, but plaintex is a different filetype which has a much simpler syntax specification. Feel free to use it if you find rainbow parantheses more important than advanced syntax highlighting. For more info, see |
Thanks for looking in to this so quickly anyway. I'll go for the advanced syntax highlighting any time of day. The rainbow parentheses are sugar on the cake when I have a large formula with a lot of fractions combined with sub/superscripts... So when debugging the latter, I'll switch syntax manually.... Thanks again (and |
Thanks for the applause :) Note, I think your issue should be followed up by luochen. I've added an update on that issue. |
It seems the syntax file in vimtex perturbs the rainbow parenthesis plugin https://github.com/luochen1990/rainbow.
Opening a tex file, I don't see any rainbow parenthesis. If I then manually set the filetype to plaintex, the rainbow parenthesis plugin works and the colored parentheses appear...
I've posted this also at the rainbow plugin (luochen1990/rainbow#142), but no response there...
Any tips welcome....
Thanks.
The text was updated successfully, but these errors were encountered: