fix(editor): use Monaco's registered proto language id for .proto files (#9286)
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user