Comments (5)
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.
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.
I definitely still happens, but I was not yet able to create a minimal example reproducing it…
from tsx-mode.el.
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.
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)
- CSS in JS indentation of interpolated string incorrect when first line in CSS in JS region HOT 3
- Support LSP based CSS completions HOT 2
- Interpolating Javascript Breaks CSS Syntax Highlighting HOT 6
- Generator names aren't highlighted HOT 2
- Indentation is broken, giving this error message: `tsi-indent-line: Symbol’s value as variable is void: node-at-point` HOT 3
- Self closing tag inserted in generic params HOT 1
- Library Header still blocks installation tsx-mode on Emacs 27 + HOT 1
- Auto-close tags doesn't work reliably when opening an existing file HOT 3
- Origami regions for things other than CSS-in-JS HOT 3
- Indent does not function correctly until `tsi-mode` is reenabled HOT 10
- Is it possible to get GraphQL syntax highlighting for `gql` tags? HOT 4
- clean up compiler warnings
- Comment behavior for JSX incorrect in some edge cases HOT 1
- install fails HOT 1
- Wrong indentation with indent-region (which calls lsp-format-region) HOT 1
- eslint LSP integration HOT 2
- Initialization error HOT 3
- Malformed dependency metadata: "tsx-mode.el"
- Disabling eldoc-doc-buffer minibuffer popping up all the time HOT 2
- Doesn't work on Emacs29 / NixOS 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 tsx-mode.el.