Skip to content

Alpine.js x-for tuple syntax (item, index) falsely flagged as errors in HTML template #107

@Donghh0221

Description

@Donghh0221

Environment

  • IDE: IntelliJ IDEA 2025.1.1.1
  • Plugin: Alpine.js Support 0.7.0
  • Project Type: Standard web project (HTML + Alpine.js)

Description

When using Alpine.js loop syntax with an index tuple, the IDE reports multiple false syntax errors on the (item, index) portion of an x-for directive. The template runs correctly in the browser; the issue is limited to editor parsing/highlighting.

Observed (all on the (item, index) segment)

  • Variable name expected
  • 'in' or ; expected
  • Declaration expected
  • Newline or semicolon expected

Expected

No errors; (item, index) in collection is valid Alpine.js syntax (documented).

Request

Please update the plugin parser to recognize Alpine.js tuple destructuring form (item, index) in list and suppress false error annotations.

Reference

Alpine.js docs: https://alpinejs.dev/directives/for#accessing-indexes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions