nova-prettier icon indicating copy to clipboard operation
nova-prettier copied to clipboard

Stopped working with shufo/prettier-plugion-blade within past few days

Open yabdab opened this issue 1 year ago • 9 comments

I use this plugin and it works great with blade files.

https://github.com/shufo/prettier-plugin-blade

Until v2.5.1 or 2.60 everything worked great.

Is there a way to roll back to previous version in Nova to troubleshoot?

yabdab avatar May 05 '23 20:05 yabdab

Can confirm. The extension console log says there aren't any changes: Formatting <file here> and next line No changes for <file here>

Works fine on regular PHP files, though, and formatting Blade files in the command line works, too.

benwittorf avatar May 09 '23 10:05 benwittorf

FWIW, I added the following lines to .prettierrc for the plugin:

  "overrides": [
    {
      "files": ["*.blade.php"],
      "options": {
        "tabWidth": 2,
        "parser": "blade"
      }
    }
  ],

Also, Blade files in Nova are selected as such, too, not as PHP files, via this Nova extension: https://github.com/melvinbeemer/Blade.novaextension

benwittorf avatar May 09 '23 10:05 benwittorf

Yes I have been using the Blade plugin as well for quite some time. 👍

Is there a way to roll back this nova-prettier plugin to when it worked correctly?

yabdab avatar May 09 '23 10:05 yabdab

I did some debugging and found the bug.

The problem was introduced in v.2.6.0 and is due to this changes made in the following file ...

prettier.novaextension/Scripts/prettier-service/prettier-service.js

Changes made to the getConfig function are the culprit.

Hopefully this will help the devs fix the problem and release a fix.

yabdab avatar May 09 '23 13:05 yabdab

After quitting Nova: I pretty much rollbacked to 2.5.1 (up to commit 9eddeaa) in a local repository and replaced all files in the corresponding files in the Nova extensions directory, and changed version from 2.5.1 to 2.6.0 in the extension.json so it won't be autoupdated when starting Nova again.

Not an ideal solution, but at least I can keep on using Nova instead of switching back to VS Code.

benwittorf avatar May 25 '23 08:05 benwittorf

@benwittorf you can also go into General settings and disable auto updates on extensions.

yabdab avatar May 25 '23 17:05 yabdab

True, but only for all, which I don't want 😃

benwittorf avatar May 25 '23 17:05 benwittorf

Why is this bug not been fixed yet? It's all right there.

yabdab avatar Jun 12 '23 10:06 yabdab

Update: Installing latest version of node globally seems to have sorted the matter 🤷‍♂️

Now using this extension (2.6.0) and [email protected] @shufo/[email protected]

Works great!

yabdab avatar Aug 03 '23 12:08 yabdab