Giter Club home page Giter Club logo

Comments (12)

mxw avatar mxw commented on July 16, 2024

Unable to repro. Please verify that you (a) have installed all the dependencies required; (b) either have the (deprecated) JSX pragma at the top of your file or have named your file with the .jsx extension; and (c) are not hitting any conflicts with other vim packages (you can test this by just unincluding them and seeing the resultant behavior).

from vim-jsx.

dhruvarora avatar dhruvarora commented on July 16, 2024

Unable to resolve unfortunately-- could you tell me what Vim theme you're using? It might be a color scheme issue!

from vim-jsx.

mxw avatar mxw commented on July 16, 2024

I'm using solarized, but I doubt that's the issue. If you want to send me links to a gist of the most trimmed-down ~/.vimrc you tested that still fails, as well as a gist of the full file where the failure is occurring (with the appropriate filename), I can try to help you debug further.

from vim-jsx.

dhruvarora avatar dhruvarora commented on July 16, 2024

vimrc: here
code : here

Thanks so much for this! You're awesome!

from vim-jsx.

mxw avatar mxw commented on July 16, 2024

The issue is almost certainly that you're using two conflicting JS syntax packages... vim-jsx is only known to function with pangloss/vim-javascript at this time. If you comment out the jelera plugin, do things work?

from vim-jsx.

dhruvarora avatar dhruvarora commented on July 16, 2024

Unfortunately they don't. I've left in only pangloss/vim-javascript and vim-jsx and I end up with the same issue.
I'm not using any highlighting packages which is what makes this issue rather confusing.

from vim-jsx.

mxw avatar mxw commented on July 16, 2024

Oh, strange...

Apologies in advance if I don't get to solving this very quickly, but...

What plugin manager are you using? It doesn't look like pathogen or Vundle, which are the only ones I'm familiar with. I'm also not sure what things like syntastic or emmet-vim do. What happens if you comment out literally everything from your ~/.vimrc except the lines of code that include the plugins and the ones that turn syntax on? (I don't see a call to syntax enable anywhere... maybe your plugin manager handles it? But what happens if you add that line after the plugin init sequence?)

from vim-jsx.

dhruvarora avatar dhruvarora commented on July 16, 2024

That's okay -- It's not a major issue just a bit annoying to look at tags.

I use vim-plug which is pretty much identical to vundle -- just more lightweight.

Syntastic is a syntax checking plugin that runs code through an external syntax checkers.

I've commented everything out but this plugin and pangloss but I still get the same error. I've additionally changed themes but still get the same error.

I think I accidentally deleted syntax enable when I moved the file to gist. It's definitely in my .vimrc. Sorry about that.

from vim-jsx.

lionelB avatar lionelB commented on July 16, 2024

Hi!
Glad to see I'm not alone since I've exactly the same issue.
Did you manage to get the same color match for opening and closing tag ?
For instance, I 'm using a base16 theme for both vim and Terminal.app (theme a generated using the base16-builder

from vim-jsx.

lionelB avatar lionelB commented on July 16, 2024

I've made a quick test using this vimrc file on macVim

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'

call vundle#end()   
filetype plugin indent on

:set regexpengine=1
:syntax enable
let g:jsx_ext_required = 0

syntax on
set background=dark
colorscheme base16-default

the colorscheme is on gist

Here is screen capture from macVim
capture d ecran 2015-10-05 a 16 16 44

from vim-jsx.

mxw avatar mxw commented on July 16, 2024

What happens when you set let g:jsx_ext_required = 1? This is working fine for me, both with and without JSX support enabled; if you can repro with vim-jsx disabled, then maybe your pangloss/javascript version is too old.

It's also weird to me that your and tags are mishighlighted. They're fine for me—although, oddly, the closing brace for the HomePage class is highlighted like "export" for me, and deleting "export" fixes it...

Surprisingly enough, I am actually not a JS developer and am totally out of the loop on ES6, so I pretty much have no idea what is happening in that file and how it "ought" to highlight :\

from vim-jsx.

lionelB avatar lionelB commented on July 16, 2024

Hello,
thanks to take time on my odd problem. doing let g:jsx_ext_required = 1 and openning jsx fil (I use js extension) turn jsx coloring off (except for "quoted string")

I can't figure if it come from the colorscheme or from vim-jsx :/
Can I ask you which color scheme you have, to check if I have the correct output ?

from vim-jsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.