Add built-in language grammar extensions for C#, F#, HTML, and Javascript. (#18216)

This commit is contained in:
Cory Rivera
2022-02-04 16:44:47 -08:00
committed by GitHub
parent 6c8e2bf8f3
commit 7bd5968faa
39 changed files with 22564 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
test/**
cgmanifest.json

View File

@@ -0,0 +1,18 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "3311701c243d6ed5b080a2ee16ada51540a08c50"
}
},
"license": "MIT",
"description": "The file syntaxes/fsharp.json was included from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json.",
"version": "0.0.0"
}
],
"version": 1
}

View File

@@ -0,0 +1,31 @@
{
"comments": {
"lineComment": "//",
"blockComment": [ "(*", "*)" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
"folding": {
"offSide": true,
"markers": {
"start": "^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)",
"end": "^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)"
}
}
}

View File

@@ -0,0 +1,50 @@
{
"name": "fsharp",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},
"scripts": {
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json"
},
"contributes": {
"languages": [
{
"id": "fsharp",
"extensions": [
".fs",
".fsi",
".fsx",
".fsscript"
],
"aliases": [
"F#",
"FSharp",
"fsharp"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "fsharp",
"scopeName": "source.fsharp",
"path": "./syntaxes/fsharp.tmLanguage.json"
}
],
"snippets": [
{
"language": "fsharp",
"path": "./snippets/fsharp.code-snippets"
}
]
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}

View File

@@ -0,0 +1,4 @@
{
"displayName": "F# Language Basics",
"description": "Provides snippets, syntax highlighting, bracket matching and folding in F# files."
}

View File

@@ -0,0 +1,16 @@
{
"Region Start": {
"prefix": "#region",
"body": [
"//#region $0"
],
"description": "Folding Region Start"
},
"Region End": {
"prefix": "#endregion",
"body": [
"//#endregion"
],
"description": "Folding Region End"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1