Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
333 stars 96 forks source link

[Intelligent code completion] Support iterated objects via `for`, inside `form` #681

Closed Poitrin closed 1 year ago

Poitrin commented 1 year ago

Describe the bug In the following example, when a for loop is inside a form, ICC doesn't seem to work.

{%- form 'localization', id: 'FooterLanguageFormNoScript', class: 'localization-form' -%}
  {%- for language in localization.available_languages -%}
    <option value="{{ language.⬜️

Simplified version of https://github.com/Shopify/dawn/blob/main/sections/footer.liquid#L276

Expected Expected suggestions like iso_code. Expected suggestions like iso_code

Actual Default suggestions from VS Code Default suggestions from VS Code

Debugging information