I installed the jsprettier formatting package in ST3 using the Package Installer but then the plugin didn’t work. The error message said it had failed to find the path to the executable. I therefore uninstalled it and then did a global install using the cmd line and ‘npm install -g prettier’. This worked OK. I then reinstalled jsprettier in ST3 and added the path to the executable which I took to be C:\Users\Mike\AppData\Roaming\npm\node_modules\prettier\bin-prettier.js. I’m now getting: Error: Couldn’t resolve parser “php” Can’t find any reference to this via Google - can anyone suggest a fix?
jsPrettier problems
Did you try to open a ticket in the prackage’s issue tracker https://github.com/jonlabelle/SublimeJsPrettier/issues?
No because I am assuming this is not an issue with the plugin but with some setting I have got wrong. I am now wondering whether it is even designed to work with php files - all my web files are php.
Settings problems related to settings in third party packages should still be reported on the issue tracker of their respective package; the Sublime core provides the settings API but it’s up to the package that uses the setting to know what to do with it.
That said, https://prettier.io/ mentions that php
is one of the supported languages but that it requires https://github.com/prettier/plugin-php to be installed, so perhaps that’s the issue you’re seeing here.
Ah, thanks for that info, but I read that ‘Please note that this plugin is currently in alpha stage and still under active development.’
I think the answer might be to switch to vscode!