Skip to content
Open
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
5 changes: 5 additions & 0 deletions CodeApp/Managers/LanguageService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class LanguageService {
languageIdentifier: "java",
extensions: ["java"],
args: ["java", "-jar", "${JAVA_LSP_FAT_JAR_PATH}"]),
Configuration(
languageIdentifier: "fsharp",
extensions: ["fs", "fsi", "fsx", "fsproj"],
args: ["dotnet", "fsautocomplete"] // Uses fsautocomplete, the F# LSP server
),
]

static func configurationFor(url: URL) -> Configuration? {
Expand Down
8 changes: 8 additions & 0 deletions CodeApp/Views/NewFileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ struct NewFileView: View {
import Swift
print("Hello, World!")
"""
case 100:
name = "default.fsx"
content = """
// Created on \(UIDevice.current.name).

printfn "Hello, World!"
"""
case -2:
name = "index.html"
content = """
Expand Down Expand Up @@ -182,6 +189,7 @@ struct NewFileView: View {
.init(code: 4, name: "PHP"),
.init(code: 62, name: "Java"),
.init(code: 83, name: "Swift"),
.init(code: 100, name: "F#"),
.init(code: -2, name: "HTML"),
.init(code: -3, name: "CSS"),
]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Use [VS Code](https://github.com/microsoft/vscode) as a design template while pr
- C/C++ Runtime with WebAssembly (with clang) ✅
- Local Java (OpenJDK) ✅
- SSH Support ✅
- [LSP](https://microsoft.github.io/language-server-protocol) support (Python & Java) ✅
- [LSP](https://microsoft.github.io/language-server-protocol) support (Python, Java & F#) ✅

## Building the project

Expand All @@ -41,3 +41,4 @@ The source code of the built-in languages are hosted on these repositories.
| PHP 8.3.2 | [php-src](https://github.com/bummoblizard/php-src/tree/PHP-8.3.2)|
| Node.js 18.19.0 | [nodejs-mobile](https://github.com/1Conan/nodejs-mobile)|
| OpenJDK 8 | [android-openjdk-build-multiarch](https://github.com/thebaselab/android-openjdk-build-multiarch)|
| F# (.NET SDK) | [dotnet/fsharp](https://github.com/dotnet/fsharp) |