diff --git a/Edit/Modules/SyntaxService/LanguageDataStore.swift b/Edit/Modules/SyntaxService/LanguageDataStore.swift index c22bb6f..80d274c 100644 --- a/Edit/Modules/SyntaxService/LanguageDataStore.swift +++ b/Edit/Modules/SyntaxService/LanguageDataStore.swift @@ -85,7 +85,7 @@ extension LanguageDataStore { } Task { - _ = try! await loadLanguageConfiguration(with: utType, identifier: identifier) + _ = try? await loadLanguageConfiguration(with: utType, identifier: identifier) } return nil diff --git a/Edit/Modules/SyntaxService/LanguageProfile+Profiles.swift b/Edit/Modules/SyntaxService/LanguageProfile+Profiles.swift index 18d0c88..f94ff92 100644 --- a/Edit/Modules/SyntaxService/LanguageProfile+Profiles.swift +++ b/Edit/Modules/SyntaxService/LanguageProfile+Profiles.swift @@ -55,6 +55,10 @@ extension LanguageProfile { if utType.conforms(to: .rubyScript) { return LanguageProfile.rubyProfile } + + if utType.conforms(to: .rustSource) { + return LanguageProfile.rustProfile + } if utType.conforms(to: .swiftSource) { return LanguageProfile.swiftProfile @@ -142,6 +146,11 @@ extension LanguageProfile { language: Language(tree_sitter_swift()) ) + static let rustProfile = LanguageProfile( + RootLanguage.rust, + language: Language(tree_sitter_rust()) + ) + static let genericProfile = LanguageProfile( name: "generic", language: nil,