onecentlin / laravel-blade-snippets-vscode

Laravel blade snippets and syntax highlight support for Visual Studio Code
MIT License
137 stars 38 forks source link

Highlighting pure `css`/`js` blade files #188

Open bilogic opened 1 week ago

bilogic commented 1 week ago

https://github.com/shufo/vscode-blade-formatter/issues/884

Description

  1. I sometimes generate CSS/JS that contain configuration by users.
  2. And I usually save them as style-css.blade.php, which renders as a style.css
  3. Likewise, script-js.blade.php, which renders into script.js

The problem is, these files cannot have <style> nor <script> and as a result, this highlighter does not know how to handle them.

Suggested Solution

Have flags {{-- js-formatter-enable --}} and {{-- js-formatter-disable --}} that highlighter everything in between as JS Do the same for CSS