Microsoft/monaco-editor
Auf GitHub ansehen[Feature Request] Bump Java language support to latest version
Open
#3.582 geöffnet am 21. Feb. 2023
feature-requesthelp wantedlanguages-basic
Repository-Metriken
- Stars
- (14.836 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6h 26m) (15 gemergte PRs in 30 T)
Beschreibung
Context
- This issue is not a bug report. (please use a different template for reporting a bug)
- This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
The language definitions for Java seem to be fairly out of date and don't include some of the latest features included in Java 11+ (var keyword, etc.).
This is a request to update the language definition files for the Java language to use the latest (or at least a reasonably recent version).
Note that var is not highlighted while int is:

Monaco Editor Playground Link
Monaco Editor Playground Code
// The Monaco Editor can be easily created, given an
// empty container and an options literal.
// Two members of the literal are "value" and "language".
// The editor takes the full size of its container.
monaco.editor.create(document.getElementById("container"), {
value: 'class Program { \n\t public static void main(String[] args) { \n\t\t var myVar = "this is a var"; \n\t\t int myInt = 12; \n\t} \n}',
language: "java",
});