Comments (12)
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.
Unable to resolve unfortunately-- could you tell me what Vim theme you're using? It might be a color scheme issue!
from vim-jsx.
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.
Thanks so much for this! You're awesome!
from vim-jsx.
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.
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.
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.
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.
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.
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
from vim-jsx.
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.
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)
- Incorrect highlight in *.js files HOT 1
- Comments inside XML tags are not colored properly HOT 2
- jsx indenting breaks when changing colorscheme HOT 1
- Support ES6 template literals HOT 2
- Wrong indentation when omitting semicolon
- jsx omni completion HOT 3
- the plugin isn't working for me HOT 2
- Highlighting with Template literals in JSX is broken with junegunn/rainbow_parentheses.vim HOT 3
- Vim - adding new syntax hl rule does not work inside method definitions in component class HOT 1
- Backticks with curly braces in JSX break highlighting HOT 8
- Recent update breaks YouCompleteMe file path completion HOT 2
- Indenting when pasting text HOT 1
- Plugin confuses non-React .js filetype with .jsx
- Break Tags Not Right HOT 3
- Syntax (or filetype) not working properly HOT 2
- Turn off indentation portion of the plugin. HOT 2
- Setting filetype to 'javascript.jsx' is not good idea HOT 4
- My jsx isn't highlighted HOT 2
- Broken auto indentation HOT 7
- JSX syntax highlighting breaks after running `:Vex` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-jsx.