in packages/core/src/codewhisperer/util/runtimeLanguageContext.ts [61:149]
constructor() {
this.supportedLanguageMap = createConstantMap<
CodeWhispererConstants.PlatformLanguageId | CodewhispererLanguage,
CodewhispererLanguage
>({
c: 'c',
cpp: 'cpp',
csharp: 'csharp',
c_cpp: 'cpp',
go: 'go',
golang: 'go',
hcl: 'tf',
java: 'java',
javascript: 'javascript',
javascriptreact: 'jsx',
json: 'json',
jsonc: 'json',
jsx: 'jsx',
kotlin: 'kotlin',
packer: 'tf',
plaintext: 'plaintext',
php: 'php',
python: 'python',
ruby: 'ruby',
rust: 'rust',
scala: 'scala',
sh: 'shell',
shell: 'shell',
shellscript: 'shell',
sql: 'sql',
terraform: 'tf',
terragrunt: 'tf',
tf: 'tf',
tsx: 'tsx',
typescript: 'typescript',
typescriptreact: 'tsx',
yml: 'yaml',
yaml: 'yaml',
dart: 'dart',
lua: 'lua',
powershell: 'powershell',
r: 'r',
swift: 'swift',
systemVerilog: 'systemVerilog',
systemverilog: 'systemVerilog',
verilog: 'systemVerilog',
vue: 'vue',
})
this.supportedLanguageExtensionMap = createConstantMap<string, CodewhispererLanguage>({
c: 'c',
h: 'c',
cpp: 'cpp',
cc: 'cpp',
'c++': 'cpp',
cs: 'csharp',
go: 'go',
hcl: 'tf',
java: 'java',
js: 'javascript',
json: 'json',
jsonc: 'json',
jsx: 'jsx',
kt: 'kotlin',
txt: 'plaintext',
php: 'php',
py: 'python',
rb: 'ruby',
rs: 'rust',
scala: 'scala',
sh: 'shell',
sql: 'sql',
tf: 'tf',
tsx: 'tsx',
ts: 'typescript',
yaml: 'yaml',
yml: 'yaml',
sv: 'systemVerilog',
svh: 'systemVerilog',
vh: 'systemVerilog',
dart: 'dart',
lua: 'lua',
wlua: 'lua',
swift: 'swift',
vue: 'vue',
ps1: 'powershell',
psm1: 'powershell',
r: 'r',
})
}