Skip to content

Conversation

@N1ebieski
Copy link
Contributor

@N1ebieski N1ebieski commented Mar 6, 2025

This PR adds support for alpinejs highlighting syntax in blade files

I modified the regex expression from package https://github.com/pcbowers/alpine-intellisense to exclude coincident cases with the blade syntax like:

  • <x-component vs x-data
  • @foreach( vs @click=
  • :attribute vs ::class

This feature needs more testing.

Fixes #222

@TitasGailius
Copy link
Collaborator

I'm going to hold off on merging this for the moment. I really want to keep this extension's scope focused strictly on Laravel-specific features. Since AlpineJS is an optional part of the ecosystem, I'm worried that adding things like x-data highlighting might feel like "noise" for developers who aren't using it in their stack.

@N1ebieski
Copy link
Contributor Author

@TitasGailius OK, thanks for considering the merge.

I really want to keep this extension's scope focused strictly on Laravel-specific features.

This extension already supports Livewire, which isn’t a core part of the Laravel ecosystem either. AlpineJS is a required dependency of Livewire.

@TitasGailius
Copy link
Collaborator

@N1ebieski That's a good point. I'd like to give this some thought. Perhaps we can revisit it later and explore conditionally enabling AlpineJS syntax highlighting based on whether the package is detected in the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Syntax highlighting of Alpine [x-data] blocks

2 participants