Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/core/src/codewhisperer/models/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export const platformLanguageIds = [
'packer',
'plaintext',
'jsonc',
'systemverilog',
'verilog',
'powershell',
'dart',
'lua',
'r',
'swift',
'vue',
] as const

export type PlatformLanguageId = (typeof platformLanguageIds)[number]
Expand Down
22 changes: 13 additions & 9 deletions packages/core/src/codewhisperer/util/runtimeLanguageContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export class RuntimeLanguageContext {
r: 'r',
swift: 'swift',
systemVerilog: 'systemVerilog',
systemverilog: 'systemVerilog',
verilog: 'systemVerilog',
vue: 'vue',
})
this.supportedLanguageExtensionMap = createConstantMap<string, CodewhispererLanguage>({
Expand Down Expand Up @@ -120,6 +122,17 @@ export class RuntimeLanguageContext {
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',
})
}

Expand Down Expand Up @@ -242,15 +255,6 @@ export class RuntimeLanguageContext {
case 'plaintext':
return false

case 'dart':
case 'lua':
case 'powershell':
case 'r':
case 'swift':
case 'vue':
case 'systemVerilog':
return false

default:
return true
}
Expand Down
Loading