aws-toolkit-jetbrains
aws-toolkit-jetbrains copied to clipboard
Allow CodeWhisperer to suggest JS Code inside DjangoTemplates
Is your feature request related to a problem? Please describe. I’ve been using CodeWhisperer for the last week to write Python code in PyCharm, but when I switch tabs to DjangoTemplate HTML files all I get is “DjangoTemplate is currently not supported by CodeWhisperer”.
Describe the solution you'd like Since most of my code in DjangoTemplate is actually JS code inside
Describe alternatives you've considered
Meanwhile I have to use other alternatives such as prompting to Bard/GPT, but that's not nearly as useful. I can also create a .js file copying my template code and ask for suggestions, but this is not very handy since {{ }}
syntax gets highlighted and I need to copy and paste the suggestions.
@rli any known workaround for this issue?
https://github.com/aws/aws-toolkit-jetbrains/blame/40885d377cafa9835817eed56bd7ed1326798505/jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt#L123
@rli would you mind answering if this the correct line to change if I want it to work building from source? I thought of something like:
if (language === 'DjangoTemplate')
{language = 'javascript'}