Typescript / React highlighting broken
See original GitHub issueSublime Text 3 JS Custom v3.0.1
JS Custom has just upgraded, and now syntax highlighting in .tsx files (React with TypeScript) is not working correctly.
Example files:
The screenshot shows two .tsx files. Issues include:
- class and variable names are not highlighted
- incorrect hot pink highlighting in both files
- string quotes not handled correctly
I see this error in the Sublime Text console:
reloading plugin JSCustom.plugin
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 125, in reload_plugin
m = importlib.import_module(modulename)
File "./python3.3/importlib/__init__.py", line 90, in import_module
File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "/opt/sublime_text/sublime_plugin.py", line 1199, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/home/user/.config/sublime-text-3/Installed Packages/JSCustom.sublime-package/plugin.py", line 7, in <module>
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "/opt/sublime_text/sublime_plugin.py", line 1199, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/home/user/.config/sublime-text-3/Installed Packages/JSCustom.sublime-package/src/paths.py", line 7, in <module>
File "/home/user/.config/sublime-text-3/Packages/sublime_lib/st3/sublime_lib/resource_path.py", line 238, in from_file_path
"Path {!r} does not correspond to any resource path.".format(file_path)
ValueError: Path PosixPath('/home/user/.config/sublime-text-3/Installed Packages/JSCustom.sublime-package/src/paths.py') does not correspond to any resource path.
Issue Analytics
- State:
- Created 2 years ago
- Comments:23 (12 by maintainers)
Top Results From Across the Web
TypeScript React code highlighting broken #131426 - GitHub
Issue Type: Bug I noticed an issue with my usual Dracula theme: I then disabled all extensions in my editor and tried the...
Read more >Visual Studio Code syntax highlighting is not working for ...
I think this was caused by the extension called JavaScript and TypeScript Nightly. This was causing the syntax highlighting for .js and .ts ......
Read more >React Syntax Highlighter Demo
... though sometimes you'll be highlighting code you can't refactor, which is unfortunate but should be handled gracefully function createChildren(style, ...
Read more >@types/react-syntax-highlighter - npm
@types/react-syntax-highlighter. TypeScript icon, indicating that this package has built-in type declarations.
Read more >visual studio 2019 javascript syntax highlighting not working
I have created a react app in vs2019 community version 16.7.5. Syntax highlighting and IntelliSense is not working for the .js files.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All’s well that ends well? 🤷♂️
Yeah, it sounds like your install got into some kind of weird state. I have no idea why uninstalling and reinstalling didn’t fix it the first time.
Oh, this is so weird! I uninstalled JS Custom with the Packages folder open in a file browser; reinstalled JS Custom, went round the loop a couple of times more because the console was showing errors, and now it is working perfectly…it seems like something is intermittently flaky on my system but I don’t see how to debug it further.