feat(editor): add Swift (.swift) syntax highlighting

Map .swift to the built-in swift StreamLanguage from
@codemirror/legacy-modes/mode/swift (no new dependencies).
This commit is contained in:
ymac
2026-08-16 04:12:30 +08:00
parent d7dc609553
commit 515ed0abd0
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -1104,6 +1104,7 @@ describe('editor language mapping', () => {
expect(languageKeyForExt('md')).toBe('md')
expect(languageKeyForExt('cs')).toBe('csharp')
expect(languageKeyForExt('kt')).toBe('kotlin')
expect(languageKeyForExt('swift')).toBe('swift')
expect(languageKeyForExt('txt')).toBeNull()
expect(languageKeyForExt('log')).toBeNull()
expect(languageKeyForExt('')).toBeNull()