Closed sQVe closed 6 years ago
Can you provide me with a minimum working .vimrc
or .config/nvim/init.vim
, that has the above issues. And also maybe an example file, that produces the above screenshotted errors.
I'll do my best to support all the edge cases. 👍
@fleischie I tried to make time for this but didn't manage to. I'll try to do it as soon as possible. :+1:
No worries. I know the troubles of being overloaded with work/life. ☺️
Whenever you can make time. ✌️
I was able to shake some time out today and I've found a config
that consistently has issues in nvim
. With the following config
:
call plug#begin('$HOME/.local/share/nvim/plugged')
Plug 'fleischie/vim-styled-components'
Plug 'luochen1990/rainbow'
Plug 'pangloss/vim-javascript'
call plug#end()
let g:rainbow_active = 1
You can try it out against this content (the last parenthesis should be marked red):
describe('<Button>', () => {
it('', () => {});
});
Highly worth noting is that I only see this issues if I include and enable all these plugins together. They seem to not play nicely together. Let me know if you need any further information.
OK, cool. I will test this out first thing tomorrow and report back, as soon as I find something incriminating. Thanks for your effort so far. ✌️
@fleischie I did some further research and rainbow
is well known to, at times, not play well with different syntax highlighters. An example is that it highlights else
in bash with a red color, which it shouldn't.
There are some issues that touch specifically on rainbow
and vim-javascript
but I have not noticed any problems with running those plugins alone. Currently rainbow
adds more value for me compared to vim-styled-components
, but I guess I'll have to drop rainbow
as soon as this plugin adds more functionality.
@sQVe I tried to replicate the above-mentioned errors with your given vimrc.
Unfortunately I wasn't able to reproduce any of these. Both the very first screenshot as well as the second described issue was apparent in my setup (resp. in your described minimal working example).
From my limit understanding of luochen1990/rainbow
this particular plugin injects the syntax rules dynamically to extend the existing syntax rules (I can be completely wrong, though). So I really cannot give you any hints/pointers to what you should be doing.
I would of course appreciate it, if you visit once or twice in your future. But at the current time, I cannot really help you on this matter. 😭
P.S.: It seems the original issue was regarding ALE incorrectly complaining about document
and console
, but this might be because of the linting setup (e.g. es-lint-no-console, or maybe document plainly is undefined in this context). I don't know, whether we want to create a new issue with the rainbow-interaction directly or not. What do you think @sQVe ?
@fleischie Are you using vim
or neovim
. I'm using neovim
and it might very well only be visible on there.
I think we should create a new issue and just link back to this one for history. I think the main culprit here is https://github.com/luochen1990/rainbow. This is a classic case of too many chefs though.
I noticed some strange syntax highlights when running
vim-styled-components
together withAle
today. Note above that I have two linting errors in the image above but the)
is also marked red. These marks are at times persistent and sometimes disappears after scrolling.The issue is not there after you uninstall
vim-styled-components
. I'm runningneovim @ 0.2.2-3
.