Skip to content

Commit 849ff33

Browse files
authored
fix(cloud9): CodeWhisperer not available in C++ files #3879
Problem: In Cloud9 the languageId for any C/C++ document 'c_cpp'. Solution: Accept 'c_cpp' as a languageId supported by CodeWhisperer.
1 parent 183ebec commit 849ff33

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/codewhisperer/models/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const supportedLanguages = [
9393
'csharp',
9494
'c',
9595
'cpp',
96+
'c_cpp', // Cloud9 reports C++ files with this language-id.
9697
'go',
9798
'kotlin',
9899
'php',

src/codewhisperer/util/runtimeLanguageContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class RuntimeLanguageContext {
3636
typescriptreact: 'tsx',
3737
csharp: 'csharp',
3838
c: 'c',
39+
c_cpp: 'cpp',
3940
cpp: 'cpp',
4041
go: 'go',
4142
kotlin: 'kotlin',
@@ -55,6 +56,7 @@ export class RuntimeLanguageContext {
5556
typescriptreact: 'tsx',
5657
csharp: 'cs',
5758
c: 'c',
59+
c_cpp: 'cpp',
5860
cpp: 'cpp',
5961
go: 'go',
6062
kotlin: 'kt',

0 commit comments

Comments
 (0)