Coder Social home page Coder Social logo

Highlighting is broken about tsx-mode.el HOT 5 CLOSED

ckruse avatar ckruse commented on May 26, 2024
Highlighting is broken

from tsx-mode.el.

Comments (5)

orzechowskid avatar orzechowskid commented on May 26, 2024

hm, this seems to work correctly for me when I start with an empty buffer and create a component. I suspect I'm font-locking the wrong part of a buffer when some event happens.

does this file include styled components? if you create and then delete an empty styled-components region to trigger a font-lock (just styled.div`` is sufficient), does the problem go away?

from tsx-mode.el.

ckruse avatar ckruse commented on May 26, 2024

Hm, I can't reproduce it anymore.

No, the file doesn't include styled components, we don't use them in this project.

I will try to reproduce it during the day, and when I can't I will close this bug, assuming that it was an outlier.

from tsx-mode.el.

ckruse avatar ckruse commented on May 26, 2024

I definitely still happens, but I was not yet able to create a minimal example reproducing it…

from tsx-mode.el.

orzechowskid avatar orzechowskid commented on May 26, 2024

if no CSS-in-JS strings are present in your source code then syntax highlighting should be applied by tree-sitter-hl-mode and not by any code I've written. if you evaluate (tree-sitter-hl--highlight-region (point-min) (point-max) nil) in your buffer, is syntax highlighting applied correctly?

even if you can not create an example for us to reproduce the issue (and thank you for trying!), do you have a sense of the general circumstances which trigger it? editing JSX? adding comments? something else?

from tsx-mode.el.

ckruse avatar ckruse commented on May 26, 2024

It didn't happen the last two days… I guess I misinterpreted something. I did notice some // rendered as comments where it was counter-intuitive but correct (I assumed a TSX context because it was located directly above the first tag, but this is of course a plain TS context). Sorry for the noise.

from tsx-mode.el.

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.