Comments (4)
We support tree-sitter now, textmate grammar is sort of deprecated at this point. Most of the grammar comes from tree-sitter-java, so you would have to check if they handle the keyword there.
from language-java.
#234 was merged just 10 days ago, so I didn't expect it was deprecated already ;-)
Will look at tree-sitter-java, but if it doesn't support the latest Java 15 syntax, does it mean the content from #234 will be lost?
from language-java.
(for context) The deprecation seems fast in isolation, but the general policy across Atom for a long time now has been to focus only on the Tree-sitter version if it exists. And as of 10 days ago it now exists here too.
The TextMate grammars are still included and can be used by disabling Tree-sitter (either globally or Java specific). I guess in this case it's up to @sadikovi, but with other grammars with Tree-sitter support PRs for TextMate have been closed simply because Tree-sitter exists for them, and anyone still relying on the TextMate grammar was encouraged to maintain a fork of their own.
Support for the keywords may still need to be added here; Tree-sitter will parse a lot, but even if it parses those keywords some tokens might need to be discriminated further by Atom in order to apply different syntax highlighting (e.g., TS might parse public
and protected
as the same kind of token, so Atom would need to identify them like it does here). I haven't looked at any of the Java grammars though, so it's possible the TS Java parser doesn't parse them yet too.
from language-java.
Thanks @Aerijo! It simply took me one year to finally merge the tree-sitter PR 😄 . I will continue maintaining both versions as much as I can, while tree-sitter is catching up with the textmate grammar. I will be focusing on that mostly.
@fbricon Please, don't feel discouraged and do report suggestions and issues or even open PRs! All I was trying to say in my earlier post was that tree-sitter bugs and features will take priority over the textmate grammar now.
I will open the PR for the textmate to add non-sealed
keyword later this week.
from language-java.
Related Issues (20)
- Enum not correctly hightlighted when mixed with constructor and code overrides HOT 1
- Inconsistency of variable and new-variable method call
- Inconsistency of type highlighting in new expression
- Catch parameter not correctly highlighted when declared in new line or with a comment in between HOT 4
- Scope variables in expressions HOT 3
- Custom color for arguments used in method body
- Java 14's new record keyword is not highlighted properly HOT 5
- Field has different pattern if "this" is omitted HOT 1
- Syntax highlighting is broken with array syntax HOT 1
- Wrong highlighting on 'new' keyword on inner classes HOT 6
- Variable camelCase name is incorrectly highlighted in a statement with "instanceof" HOT 2
- Highlight 'yield' keyword in switch statement
- Highlight keyword 'sealed' for Java 15 HOT 2
- Tree-sitter compatibility work
- Java tree-sitter syntax highlighting does not parse annotations correctly HOT 1
- Java tree-sitter grammar does not consistently highlight constants
- @link highlighting broken when linking to class HOT 1
- module name and comments not highlighted in module-info.java HOT 4
- <unknown> is deprecated. 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 language-java.