Skip to content

Commit 2628e2d

Browse files
committed
add inline completion supporting language, verilog, powershell, dart, lua, r, swift, vue
1 parent 2b60a35 commit 2628e2d

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ export const platformLanguageIds = [
9898
'packer',
9999
'plaintext',
100100
'jsonc',
101+
'verilog',
102+
'powershell',
103+
'dart',
104+
'lua',
105+
'r',
106+
'swift',
107+
'vue',
101108
] as const
102109

103110
export type PlatformLanguageId = (typeof platformLanguageIds)[number]

packages/core/src/codewhisperer/util/runtimeLanguageContext.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class RuntimeLanguageContext {
9393
r: 'r',
9494
swift: 'swift',
9595
systemVerilog: 'systemVerilog',
96+
verilog: 'systemVerilog',
9697
vue: 'vue',
9798
})
9899
this.supportedLanguageExtensionMap = createConstantMap<string, CodewhispererLanguage>({
@@ -234,24 +235,20 @@ export class RuntimeLanguageContext {
234235
* @returns true if the language is supported by CodeWhisperer otherwise false
235236
*/
236237
public isLanguageSupported(languageId: string): boolean {
238+
console.log('id', languageId)
237239
const lang = this.normalizeLanguage(languageId)
240+
console.log('normalized id', lang)
238241
switch (lang) {
239242
case undefined:
243+
console.log('false')
240244
return false
241245

242246
case 'plaintext':
243-
return false
244-
245-
case 'dart':
246-
case 'lua':
247-
case 'powershell':
248-
case 'r':
249-
case 'swift':
250-
case 'vue':
251-
case 'systemVerilog':
247+
console.log('false')
252248
return false
253249

254250
default:
251+
console.log('true')
255252
return true
256253
}
257254
}

0 commit comments

Comments
 (0)