shufo / vscode-blade-formatter

An opinionated Blade file formatter for VSCode
https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter
MIT License
4.2k stars 31 forks source link

[Bug]: After the installation, blade files lose syntax highlight! #823

Closed trollfalgar closed 4 months ago

trollfalgar commented 7 months ago

Description

The formatting is working. But some conflict made blade files lose syntax highlight!

codede

Expected Behavior

Not lose syntax highlight!

Actual Behavior

Lose syntax highlight!

Additional Context

Version: v0.24.1 SO: Windows (WSL)

shufo commented 7 months ago

This extension does not have syntax highlight feature. Please try using Laravel Blade Snippet for Syntax highlighting.

trollfalgar commented 7 months ago

This extension does not have syntax highlight feature. Please try using Laravel Blade Snippet for Syntax highlighting.

I know it doesn't have. But when I install it, blade files lose syntax highlight. Some conflict must be happening. I'll investigate.

shufo commented 6 months ago

Related issue: https://github.com/shufo/vscode-blade-formatter/issues/56#issuecomment-1662981245

There are multiple highlight plugins for blade. I'd recommend to use only Laravel Blade Snippet cause it's confirmed working with this extension.

jkvithanage commented 6 months ago

This extension does not have syntax highlight feature. Please try using Laravel Blade Snippet for Syntax highlighting.

I had the same issue with syntax highlighting. Laravel Blade Snippet solved it!

In summary, you should install both Laravel Blade Formatter and Laravel Blade Snippet extensions to get formatting and syntax highlighting.

DamianSuess commented 5 months ago

I ran into the same issue as well after installing the extension, all the text went to "white".

The noticeable difference was that it updates the file's Language Mode from PHP -> Blade. In the short term, I can manually change the Language Mode by clicking the bottom status bar.

It does kinda make sense that the extension is setting it up this way. I was just thrown off when it "poof" went away without warning. Perhaps add a warning to the install documentation.

   vscode.languages.registerDocumentFormattingEditProvider("blade", ...

Reproduce

  1. Install the extension
    • No syntax highlighting; language mode: PHP
  2. Disable the extension
    • Highlighting comes back; language mode: Blade
  3. Reenable the extension
    • No syntax highlighting again; language mode: PHP

Installed

image

Disabled/Uninstalled

image