-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEGA-ISSUE: Syntax highlighting in language-typescript
#874
Comments
@jakubhruby has reported that objects of the form |
Regarding the issue above: I've just added some scopes into TypeScript files that were previously only present in JavaScript files. This ensures that they'll be scoping long object chains (like the ones in the screenshot above) identically. Those scope names have changed from the ones assigned in the legacy Tree-sitter grammar. Intermediate segments of the chain are scoped as But I don't want that change to feel disruptive, so I've just made a corresponding change in the One Dark and One Light syntax themes to ensure that any scope name with a These changes are now part of #859 and will go out no later than mid-February in Pulsar 1.114, and perhaps sooner if we can manage it. |
The same part of code while Using legacy tree-sitter implementation set to true: |
It's not only the chained props highlighting, but also called functions (in top of the screenshot) and object key-value pairs (e.g. |
Whatever you can provide I'd be happy to look over. I want to make sure we get this right. As for the things you mentioned:
|
I notice that Legacy Tree-sitter scopes the Instead, I decided that the This might be another situation where the theme changes to agree with folks‘ expectations, or it might be one where I change a scope name in the spirit of compromise. The goal is that, no matter what we land on, there's enough detail in the scope names so that people can override these choices however they want. Some of the old scopes were terse enough that you couldn't customize how one thing looked without inadvertently changing something else. |
@jeffplays2005, those were both very easy to address. They're part of #968 and will ship in 1.116 — probably in about 11 days. Thanks! |
IMPORTANT: Some issues have already been fixed!
If you’re still on the regular 1.113 release, you might be suffering from a problem that has already been fixed. Many fixes landed on
master
in #859. You are encouraged to download the latest rolling release — both (a) to see whether what you’re reporting has been fixed, and (b) so that you can enjoy the fixes that have been reported since the 1.113 release.This will serve as a catch-all issue for any problems you may encounter with syntax highlighting in TypeScript or TypeScript (React) files (
language-typescript
). If you have problems with the new syntax highlighting (or folds, or indents) that are specific tots
ortsx
files, keep reading.Something isn't highlighting correctly!
If there are any highlighting regressions since 1.113:
First, please scroll down and see if someone else has reported the issue. If not, please comment with
I want to go back to the old highlighting!
You can easily opt out of the new Tree-sitter highlighting for any language, but first please:
To revert to the old Tree-sitter grammar for this language only, add the following to your
config.cson
:To revert to the TextMate-style grammar for this language only, add the following to your
config.cson
:The text was updated successfully, but these errors were encountered: