fix(editor): use Monaco's registered proto language id for .proto files (#9286)

This commit is contained in:
Jinho Choi
2026-07-18 00:22:20 -07:00
committed by GitHub
parent 45c4a1f61e
commit 72d0a403a3
2 changed files with 5 additions and 1 deletions
@@ -38,6 +38,10 @@ describe('detectLanguage', () => {
expect(detectLanguage('C:\\rtl\\TOP.SV')).toBe('systemverilog')
})
it('maps .proto files to the Monaco built-in proto language id, not the alias', () => {
expect(detectLanguage('api/v1/service.proto')).toBe('proto')
})
it('maps .jsonl files to the dedicated jsonl language id (case-insensitive)', () => {
expect(detectLanguage('/home/user/.claude/sessions/transcript.jsonl')).toBe('jsonl')
expect(detectLanguage('C:\\Users\\alice\\.codex\\LOG.JSONL')).toBe('jsonl')
+1 -1
View File
@@ -69,7 +69,7 @@ const EXT_TO_LANGUAGE: Record<string, string> = {
'.graphql': 'graphql',
'.gql': 'graphql',
'.dockerfile': 'dockerfile',
'.proto': 'protobuf',
'.proto': 'proto',
'.lua': 'lua',
'.r': 'r',
'.R': 'r',