Giter VIP home page Giter VIP logo

Comments (5)

kyoz avatar kyoz commented on May 29, 2024

I forgot a picture to demonstrate this.

On the left is 'jsx' and on the right is 'js' file:

I'm just using leafgarland/typescript-vim plugin for typescript. The rest is all vim built-in syntax.

On the right is still syntax, but it's all vim built-in syntax with customize of my theme

from vim-jsx-pretty.

yuezk avatar yuezk commented on May 29, 2024

I think it's a problem with your plugin. The syntax groups defined in your color.vim broke the syntax highlighting.

Try to comment out this line.

https://github.com/kyoz/purify/blob/2fd85fb6a448af98abd0a8452a8849d7cd7a3bcc/vim/colors/purify.vim#L365

from vim-jsx-pretty.

kyoz avatar kyoz commented on May 29, 2024

Yeah, i'v tested. it's definitely the error of that syntax:

syn match   javascriptOpSymbols  "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\|-="

But i'v tried this regex, it's working normally. I really don't know what cause conflict error there. Do you have any idea. Sorry i'm not really good at regex.

from vim-jsx-pretty.

yuezk avatar yuezk commented on May 29, 2024

The definition order of the syntax in Vim matters. So in my humble opinion, if you want to overwrite the syntax of some file type, you would better do it in the syntax/<filetype>.vim.

So for this issue, you can try to move the overwrite rules to the syntax/javascript.vim file of your plugin.

from vim-jsx-pretty.

kyoz avatar kyoz commented on May 29, 2024

Hi @yuezk , that's really a good idea. I'v updated my plugin to separate custom defined syntax in syntax/ folder and it now work perfectly.

So, i'll close this issue cause this's not vim-jsx-pretty issue. Thank you a lot for your plugin and helping ❤️

from vim-jsx-pretty.

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.