Closed mulholo closed 5 years ago
I have disabled coloresque, indentLine, delimitMate and vim-polygot and none of them seem to be causing the issue.
Hey @mulholio
I saw your issue and I will check it out as soon as I can.
I glimpsed, that you used yats
. Is the above example a typescript file? Just so I know what to look for?
Edit: Looking at it much more in detail, it seems that I misinterpreted yajs
with yats
. :stuck_out_tongue:
Hey @mulholio again.
Could you please elaborate why you are using sheerun/vim-polyglot as well as othree/yajs.vim?
I have to admit, this plugin was exclusively written using pangloss/vim-javascript respectively vim-polyglot (which uses the former). Thus it makes sense that using different syntax highlighting plugins are not supported out of the box, yet.
I might be able to support other javascript syntax highlighting plugins, but this unfortunately takes time and effort. So there is no easy quickfix for you that I could recommend right now besides disabling the yajs
plugin.
Again, I'd appreciate a short description of what made you use yajs
so maybe I get an incentive to look at it.
I use vim-polygot to give blanket support for many languages in vim. I use yajs because it works best with my favourite colour scheme, oceanic-next. A little to use js syntax in two places, but it works.
I disabled yajs to see whta the effects would be, and it removed more highlighting across the rest of my js file than I was happy with. For the time being, therefore, I'll live with lesser support for styled-components as a trade off for a nicer colour scheme and highlighting. Hope that helps!
@mulholio I can take a look at othree/yajs.vim, as there might be others that prefer it over sheerun/vim-polyglot or thus pangloss/vim-javascript.
I keep you updated on the progress.
@mulholio I now took a few hours to look at how othree/yajs classifies the base javascript syntax items to hook into it/extend it/operate on it. If you could check out the develop-branch I'd appreciate some feedback. :smile:
If you don't know how, it's:
Plug 'styled-components/vim-styled-components', { 'branch': 'develop' }
in your vimrc file where you would normally do { 'branch': 'main' }
.
Thank you for the speedy response!
Still appears to be reluctant to highlight.
It appears to have done something as my const
s are now a different colour, but this doesn't seem to be affecting the styled components highlighting
@mulholio Hmm... I have to admit I merely switched out sheerun/polyglot
with othree/yajs.vim
in my personal .vimrc
. I will check out your .vimrc
directly tomorrow, and see whether I can reproduce your results with it.
Hopefully, it's not some other random plugin causing the issue.
Thank you once again.
@mulholio I checkout out your vimrc from above, did change to { 'branch': 'develop' }
and then :PlugInstall
(I saw that you use junegunn/vim-plug).
It did not actually change the branch in the plugin-path. So either run :PlugUpdate
(this seems to update the branch, if it changed in the vimrc) or alternatively remove the line, run :PlugClean
, add it again, and run :PlugInstall
.
Let me know, if this changes anything.
NOTE: A "clean" install with { 'branch': 'develop' }
(i.e. no previous plugged
directory) works like a charm.
Badabing! Working now.
I had previously called :PlugUpdate
which I assumed updated to the correct branch. Might have only updated the main branch though as this didn't seem to fix the issue.
Commenting out the plugin completely, calling :PlugClean
, then :PlugInstall
got things working for me.
I can't seem to get the highlighting working and styled components are just showing up as regular template literals:
I apologise for the vague issue, but I can't think of any other relevant details. I am using neovim (although I saw that hadn't been an issue for other users).
You can find my .vimrc here: https://github.com/mulholio/dot-files/blob/master/vim/.vimrc