mrmlnc / vscode-pugbeautify

:electric_plug: Simple Pug/Jade beautify plugin for VS Code.
https://goo.gl/VLj9SL
MIT License
5 stars 1 forks source link

should act like default formatter for pug and jade files #5

Open techsin opened 6 years ago

techsin commented 6 years ago

right now if you press alt+shift+f in windows, default or installed formatter / beautifier is used depending on extension of file.

but if you press on pug file after installing this extension it says "There is no formatter for jade files"

bskydive commented 6 years ago

linux too

bskydive commented 6 years ago

beautify.ignore=["*/.pug"] and disabling editor.action.format doesn't help VSCode or Beautify hang with error on pug. any ideas about workaround?

bskydive commented 6 years ago

Only separated key binding for pugBeautify.execute

bskydive commented 6 years ago

drop issue, vote it, please! https://github.com/Microsoft/vscode/issues/54346

bskydive commented 6 years ago

Currently, it can work again after language switch, deleting and installing extension, removing and adding key bindings in json file. I think, the reason in reinstalling. After VSCode upgrade some plugins SHOULD be reinstalled.

default

Now the pug key binding at the top, that may helps too.

bskydive commented 6 years ago

An update: workaround makes editor.action.format broken. E.g. order in the key bindings is matter.

Answer from VSCode developer: The extension is to blame because it doesn't integrate into our formatter infrastructure but uses a separate command. We have blogged about this https://code.visualstudio.com/blogs/2016/11/15/formatters-best-practices and it's on the extension to integrate better.

So, only bind pugBeautify to another key or refactor it.

ducfilan commented 5 years ago

I have a replacement for this: pug (jade) formatter

rdhar commented 5 years ago

I have a replacement for this: pug (jade) formatter

It might also be worth considering combining efforts on this with the Prettier plugin for Pug that's currently in beta. Thanks for your time and effort in publishing the extension in the first place!