feat(editor): add C# (.cs) syntax highlighting

Map the .cs extension to the built-in csharp StreamLanguage from
@codemirror/legacy-modes/mode/clike (already a dependency, no new packages),
so .cs files open with syntax highlighting in the sidebar editor.
This commit is contained in:
ymac
2026-08-16 04:10:38 +08:00
parent ecebc97800
commit c9372de69b
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -1102,6 +1102,7 @@ describe('editor language mapping', () => {
expect(languageKeyForExt('yaml')).toBe('yaml')
expect(languageKeyForExt('sh')).toBe('shell')
expect(languageKeyForExt('md')).toBe('md')
expect(languageKeyForExt('cs')).toBe('csharp')
expect(languageKeyForExt('txt')).toBeNull()
expect(languageKeyForExt('log')).toBeNull()
expect(languageKeyForExt('')).toBeNull()