aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.47k stars 408 forks source link

sam/cfn Code Suggestion does not appear #3749

Closed subhash36 closed 1 year ago

subhash36 commented 1 year ago

Type: Performance Issue

I just installed the AWS ToolKit. Everything works fine except for the main feature which is the code suggestion.

Extension version: 1.85.0 VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz (8 x 1896)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.81GB (8.62GB free)| |Process Argv|--crash-reporter-id b987bd7b-db59-4254-8a8f-3c32ce589a70| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 95 13088 code main 0 89 1392 shared-process 1 88 6996 window [2] (Issue Reporter) 1 136 10036 gpu-process 0 44 11244 utility-network-service 0 27 13364 crashpad-handler 0 190 13484 extensionHost [1] 0 94 2012 electron-nodejs ("C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node c:\Users\hp\.vscode\extensions\redhat.vscode-yaml-1.14.0\dist\languageserver.js --node-ipc --clientProcessId=13484) 0 91 4240 electron-nodejs ("C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node c:\Users\hp\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.85.0\dist\src\stepFunctions\asl\aslServer.js --node-ipc --clientProcessId=13484) 0 80 5400 electron-nodejs ("C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node c:\Users\hp\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.85.0\dist\src\ssmDocument\ssm\ssmServer.js --node-ipc --clientProcessId=13484) 0 82 6600 electron-nodejs ("C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node "c:\Users\hp\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=13484) 0 79 9296 electron-nodejs ("C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node c:\Users\hp\.vscode\extensions\ms-edgedevtools.vscode-edge-devtools-2.1.3\node_modules\vscode-webhint\dist\src\server.js c:\Users\hp\AppData\Roaming\Code\User\globalStorage\ms-edgedevtools.vscode-edge-devtools "Microsoft Edge Tools" --node-ipc --clientProcessId=13484) 0 77 15192 fileWatcher [1] 0 158 15232 window [1] (aws-cft.yaml - Docs - Visual Studio Code) ```
Workspace Info ``` | Window (aws-cft.yaml - Docs - Visual Studio Code) | Folder (Docs): 2666 files | File types: jpg(1428) mp4(219) class(92) java(48) json(42) docx(12) | webp(9) txt(6) xml(4) png(3) | Conf files:; ```
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30803845 282f8724:30602487 f6dab269:30613381 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 pythoncmvfstrcf:30756944 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 synctok:30815622 dsvsc013:30795093 dsvsc014:30804076 diffeditorv1:30812748 ```
subhash36 commented 1 year ago

I had tried disabling and reinstalling the extension. Re-installed VS Code itself but to no luck.

justinmk3 commented 1 year ago

Assuming you referring to CodeWhisperer, you need to login before CodeWhisperer will work.

Can you provide the exact steps you took and what you tried, what kind of code file are you editing?

subhash36 commented 1 year ago

I'm referring to the auto suggestion feature while writing CFT files. It is one of the features where the key words of the CFT yaml/json syntax is auto suggested. I did try the CodeWhisperer, logged in and everything, but I guess it doesn't suggest code for yaml/json files.

justinmk3 commented 1 year ago

Thanks, I see this is a duplicate of https://github.com/aws/aws-toolkit-vscode/issues/3752

CodeWhisperer doesn't provide completion for SAM/CloudFormation JSON or YAML template files, but AWS Toolkit does automatically fetch SAM/CFN JSON schema and configures vscode so that autocompletion and syntax validation should work.