@@ -51,18 +51,20 @@ Blade templates into virtual PHP line-by-line, with a source map for
5151coordinate translation. The LSP pipeline (` with_file_content ` ,
5252` update_ast ` , ` did_close ` ) transparently handles Blade files.
5353
54- Known issues in the current implementation:
54+ ---
5555
56- ### Code actions are not Blade-aware
56+ ## Phase 2: Component Support
5757
58- Code actions like "Import class" insert a ` use ` statement at the top
59- of the file rather than inside a ` @php ` / ` <?php ` block. All code
60- actions that produce text edits need their ranges translated, and
61- actions that generate new code need to be aware of Blade structure.
58+ ### 8. Blade-aware code actions
6259
63- ---
60+ Code actions are currently disabled for ` .blade.php ` files because
61+ text edits target virtual PHP coordinates and actions like "Import
62+ class" insert ` use ` statements at the top of the file rather than
63+ inside a ` @php ` / ` <?php ` block. Re-enable code actions with:
6464
65- ## Phase 2: Component Support
65+ - Range translation (virtual PHP → Blade) for all text edits.
66+ - Blade-aware code generation (e.g. insert ` use ` inside ` @php ` ).
67+ - Filtering out actions that don't make sense in Blade context.
6668
6769### 9. Template and component file discovery
6870
@@ -431,19 +433,14 @@ Extend `tests/completion_blade.rs`:
431433
432434## Implementation Sequence
433435
434- Steps 1-2 are complete. The remaining steps build on the existing
435- preprocessor and LSP pipeline.
436-
437- ### Step 3: Remaining Phase 1 items
438-
439- Inject ` $loop ` inside ` @foreach ` blocks. Handle ` @session ` /` @error ` /
440- ` @context ` implicit variables. Implement stub directives and verbatim
441- regions. Add ` languageId ` check.
436+ Phase 1 is complete (steps 1-3): the preprocessor, LSP pipeline
437+ integration, source mapping, ` $loop ` /` @session ` /` @error ` /` @context `
438+ implicit variables, stub directives, verbatim regions, ` languageId `
439+ check, and code action suppression are all shipped.
442440
443- ** Deliverable:** ` $loop->first ` , ` $value ` inside ` @session ` blocks,
444- and ` $message ` inside ` @error ` blocks all produce completions.
441+ The remaining steps build on the existing preprocessor:
445442
446- ### Step 4: Discovery (item 9)
443+ ### Step 4: Discovery (items 8- 9)
447444
448445Implement ` src/blade/discovery.rs ` . Scan ` resources/views/ ` ,
449446` app/View/Components/ ` , ` app/Livewire/ ` at init time. Add the three
0 commit comments