Skip to content

Commit

Permalink
Java syntax extension (onivim#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryphe authored Jul 13, 2019
1 parent fb1cc9b commit cff2ef0
Show file tree
Hide file tree
Showing 9 changed files with 4,077 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/java/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/**
cgmanifest.json
17 changes: 17 additions & 0 deletions extensions/java/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "atom/language-java",
"repositoryUrl": "https://github.com/atom/language-java",
"commitHash": "759a0ac02dc091018a112b25a5a6d894918a0aa8"
}
},
"license": "MIT",
"version": "0.31.3"
}
],
"version": 1
}
33 changes: 33 additions & 0 deletions extensions/java/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"comments": {
"lineComment": "//",
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
["<", ">"]
],
"folding": {
"markers": {
"start": "^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))",
"end": "^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))"
}
}
}
29 changes: 29 additions & 0 deletions extensions/java/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "java",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json"
},
"contributes": {
"languages": [{
"id": "java",
"extensions": [ ".java", ".jav" ],
"aliases": [ "Java", "java" ],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "java",
"scopeName": "source.java",
"path": "./syntaxes/java.tmLanguage.json"
}],
"snippets": [{
"language": "java",
"path": "./snippets/java.snippets.json"
}]
}
}
4 changes: 4 additions & 0 deletions extensions/java/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"displayName": "Java Language Basics",
"description": "Provides snippets, syntax highlighting, bracket matching and folding in Java files."
}
16 changes: 16 additions & 0 deletions extensions/java/snippets/java.snippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Region Start": {
"prefix": "#region",
"body": [
"//#region"
],
"description": "Folding Region Start"
},
"Region End": {
"prefix": "#endregion",
"body": [
"//#endregion"
],
"description": "Folding Region End"
}
}
Loading

0 comments on commit cff2ef0

Please sign in to comment.