Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fsharp #35

Merged
merged 3 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/examples/"
]
}
]
}
}
39 changes: 39 additions & 0 deletions examples/example.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
namespace Example

open System
open System.IO

module Option =
let ofEmpty (str: string) =
if String.IsNullOrEmpty str then None else Some str

module Util =
let flip f a b = f b a
let joinPath a b = Path.Combine(a, b)

let getEnv a =
Option.ofEmpty
<| Environment.GetEnvironmentVariable a

module Program =
open Util

let mapping = flip joinPath ".config\\"

let fallback =
Environment.GetEnvironmentVariable "USERPROFILE"
|> Option.ofEmpty
|> Option.map (flip joinPath ".config\\")

let configDir =
List.pick id
<| [ getEnv "One"
getEnv "Two"
getEnv "Three" |> Option.map mapping
getEnv "Four" |> Option.map mapping
fallback ]

[<EntryPoint>]
let main argv =
printfn "config: %s" configDir
0 // return an integer exit code
39 changes: 20 additions & 19 deletions themes/LaserWave-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@
"storage.modifier.dart",
"keyword.declaration.dart",
"keyword.package.go",
"keyword.import.go"
"keyword.import.go",
"keyword.fsharp"
],
"settings": {
"foreground": "#40b4c4"
Expand All @@ -133,7 +134,8 @@
"support.function.go",
"support.function.console.js",
"support.function.dom.js",
"support.function"
"support.function",
"binding.fsharp"
],
"settings": {
"foreground": "#EB64B9"
Expand Down Expand Up @@ -271,17 +273,15 @@
"punctuation.separator.period.java",
"punctuation.other.period.go",
"punctuation.dot.dart",
"keyword.symbol.fsharp"
],
"settings": {
"foreground": "#74dfc4"
}
},
{
"name": "comment",
"scope": [
"comment",
"punctuation.definition.comment"
],
"scope": ["comment", "punctuation.definition.comment"],
"settings": {
"foreground": "#91889b"
}
Expand Down Expand Up @@ -323,7 +323,8 @@
"variable.other.property.js",
"variable.other.property.ts",
"support.variable.property.dom.js",
"support.variable.property.js"
"support.variable.property.js",
"variable.parameter.fsharp"
],
"settings": {
"foreground": "#40b4c4"
Expand Down Expand Up @@ -352,7 +353,8 @@
"variable.other.constant.ruby",
"constant.other.elm",
"support.constant.automatic.powershell",
"variable.language.dart"
"variable.language.dart",
"entity.name.section.fsharp"
],
"settings": {
"foreground": "#ffe261"
Expand Down Expand Up @@ -382,13 +384,14 @@
},
{
"name": "annotations",
"settings": {
"foreground": "#74dfc4",
},
"scope": [
"storage.type.annotation",
"punctuation.definition.annotation"
]
"punctuation.definition.annotation",
"support.function.attribute.fsharp"
],
"settings": {
"foreground": "#74dfc4"
}
},
{
"name": "Types",
Expand All @@ -410,18 +413,16 @@
"keyword.function.go",
"keyword.struct.go",
"storage.modifier.async.js",
"support.class.dart"
"support.class.dart",
"entity.name.type.fsharp"
],
"settings": {
"foreground": "#a96bc0"
}
},
{
"name": "Highlights",
"scope": [
"markup.bold",
"markup.italic"
],
"scope": ["markup.bold", "markup.italic"],
"settings": {
"foreground": "#EB64B9"
}
Expand All @@ -444,4 +445,4 @@
}
}
]
}
}
5 changes: 3 additions & 2 deletions themes/LaserWave-italic-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"storage.modifier.dart",
"keyword.declaration.dart",
"keyword.package.go",
"keyword.import.go"
"keyword.import.go",
"keyword.fsharp"
],
"settings": {
"foreground": "#40b4c4",
Expand All @@ -68,4 +69,4 @@
}
}
]
}
}