Merge commit 'be3e8236086165e5e45a5a10783823874b3f3ebd' as 'lib/vscode'
This commit is contained in:
2
lib/vscode/extensions/fsharp/.vscodeignore
Normal file
2
lib/vscode/extensions/fsharp/.vscodeignore
Normal file
@ -0,0 +1,2 @@
|
||||
test/**
|
||||
cgmanifest.json
|
18
lib/vscode/extensions/fsharp/cgmanifest.json
Normal file
18
lib/vscode/extensions/fsharp/cgmanifest.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"registrations": [
|
||||
{
|
||||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"name": "ionide/ionide-fsgrammar",
|
||||
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
|
||||
"commitHash": "af037b23ca4c61b02799957a61cbd05b44355caf"
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
31
lib/vscode/extensions/fsharp/language-configuration.json
Normal file
31
lib/vscode/extensions/fsharp/language-configuration.json
Normal 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*\\*\\)"
|
||||
}
|
||||
}
|
||||
}
|
29
lib/vscode/extensions/fsharp/package.json
Normal file
29
lib/vscode/extensions/fsharp/package.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "fsharp",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "1.0.0",
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"engines": { "vscode": "*" },
|
||||
"scripts": {
|
||||
"update-grammar": "node ../../build/npm/update-grammar.js ionide/ionide-fsgrammar grammar/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"
|
||||
}]
|
||||
}
|
||||
}
|
4
lib/vscode/extensions/fsharp/package.nls.json
Normal file
4
lib/vscode/extensions/fsharp/package.nls.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"displayName": "F# Language Basics",
|
||||
"description": "Provides snippets, syntax highlighting, bracket matching and folding in F# files."
|
||||
}
|
16
lib/vscode/extensions/fsharp/snippets/fsharp.code-snippets
Normal file
16
lib/vscode/extensions/fsharp/snippets/fsharp.code-snippets
Normal 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"
|
||||
}
|
||||
}
|
1797
lib/vscode/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
Normal file
1797
lib/vscode/extensions/fsharp/syntaxes/fsharp.tmLanguage.json
Normal file
File diff suppressed because it is too large
Load Diff
18
lib/vscode/extensions/fsharp/test/colorize-fixtures/test.fs
Normal file
18
lib/vscode/extensions/fsharp/test/colorize-fixtures/test.fs
Normal file
@ -0,0 +1,18 @@
|
||||
// from https://msdn.microsoft.com/en-us/library/dd233160.aspx
|
||||
|
||||
// The declaration creates a constructor that takes two values, name and age.
|
||||
type Person(name:string, age:int) =
|
||||
let mutable internalAge = age
|
||||
|
||||
new(name:string) = Person(name, 0)
|
||||
|
||||
member this.Name = name
|
||||
// A read/write property.
|
||||
member this.Age
|
||||
with get() = internalAge
|
||||
and set(value) = internalAge <- value
|
||||
|
||||
member this.HasABirthday () = internalAge <- internalAge + 1
|
||||
member this.IsOfAge targetAge = internalAge >= targetAge
|
||||
override this.ToString () =
|
||||
"Name: " + name + "\n" + "Age: " + (string)internalAge
|
1399
lib/vscode/extensions/fsharp/test/colorize-results/test_fs.json
Normal file
1399
lib/vscode/extensions/fsharp/test/colorize-results/test_fs.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user