From a3e126fc1dedda994a240bd7bc88b787f3495111 Mon Sep 17 00:00:00 2001 From: CyberSphinx <202843220+CyberSphonx@users.noreply.github.com> Date: Tue, 14 Oct 2025 15:59:14 +0000 Subject: [PATCH 1/2] Added support for f sharp --- CodeApp/Managers/LanguageService.swift | 5 +++++ CodeApp/Views/NewFileView.swift | 8 ++++++++ README.md | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CodeApp/Managers/LanguageService.swift b/CodeApp/Managers/LanguageService.swift index 9df46f5d..1ac1a419 100644 --- a/CodeApp/Managers/LanguageService.swift +++ b/CodeApp/Managers/LanguageService.swift @@ -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", "fsi"] // Placeholder, update if using F# LSP + ), ] static func configurationFor(url: URL) -> Configuration? { diff --git a/CodeApp/Views/NewFileView.swift b/CodeApp/Views/NewFileView.swift index ad2ec30b..24af2512 100644 --- a/CodeApp/Views/NewFileView.swift +++ b/CodeApp/Views/NewFileView.swift @@ -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 = """ @@ -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"), ] diff --git a/README.md b/README.md index 9f6d3044..07ee0190 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) | From e9fcd271c97949e34f3f54cedb29d9161b6f8506 Mon Sep 17 00:00:00 2001 From: CyberSphinx <202843220+CyberSphonx@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:12:40 +0000 Subject: [PATCH 2/2] made the server correct. --- CodeApp/Managers/LanguageService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeApp/Managers/LanguageService.swift b/CodeApp/Managers/LanguageService.swift index 1ac1a419..5dd0c8df 100644 --- a/CodeApp/Managers/LanguageService.swift +++ b/CodeApp/Managers/LanguageService.swift @@ -29,7 +29,7 @@ class LanguageService { Configuration( languageIdentifier: "fsharp", extensions: ["fs", "fsi", "fsx", "fsproj"], - args: ["dotnet", "fsi"] // Placeholder, update if using F# LSP + args: ["dotnet", "fsautocomplete"] // Uses fsautocomplete, the F# LSP server ), ]