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.43k stars 362 forks source link

cfn/sam autosuggestion not working #3752

Open prannoy10 opened 11 months ago

prannoy10 commented 11 months ago

Type: Bug

I am not getting autosuggestion after installing AWSToolkit and yaml plugins. When I'm typing AWST i expected to get autosuggestion to AWSTemplateformatversion.

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: Connection to 'ssh-remote+t2.micro' could not be established

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)| |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: unavailable_off
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.91GB (3.61GB free)| |Process Argv|--crash-reporter-id a6887d3e-eee2-4060-b629-eaac6dc90121| |Screen Reader|no| |VM|0%| Connection to 'ssh-remote+t2.micro' could not be established
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30803845 3biah626:30602489 f6dab269:30613381 showlangstatbar:30737416 a2ce3375:30757347 24365598:30736109 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 asynctok:30815620 dsvsc013:30795093 dsvsc014:30804076 diffeditorv1:30812748 ```
subhash36 commented 11 months ago

same here

justinmk3 commented 11 months ago

What is the name of the file and its contents?

I can't reproduce the issue, it works for me: image

I tried with a new, empty template.yaml file as well as an existing one.

justinmk3 commented 11 months ago

@prannoy10 @subhash36 can you check if the codelens shown below is appearing near the top of your document:

Screenshot 2023-08-21 at 02 59 48

If not, try selecting the SAM json schema by clicking Select JSON schema item in the statusbar next to the "YAML" language mode indicator:

Screenshot 2023-08-21 at 03 00 49

subhash36 commented 11 months ago

Got it. The second solution helped. I understood that the file extension must be '.yml'. The AWS Json schema doesn't appear if the file extension is ' .yaml ' . Thank you @justinmk3 !

justinmk3 commented 11 months ago

It should work with .yaml or .yml. I wonder if another extension or JSON schema is taking precedence.

subhash36 commented 11 months ago

I've downloaded the YAML extension. Do you think that is taking precedence ?