prettier-plugin-liquidsoap v1.4.4
Liquidsoap prettier
This package provides a Prettier plugin for liquidsoap code
as well as a liquidsoap-prettier
binary for formatting liquidsoap scripts.
Installation
liquidsoap-prettier
The liquidsoap-prettier
command-line utility should be installed with this
package and should be available following the usual node package binary
conventions.
It works as follows:
$ liquidsoap-prettier [-w|--write] /path/to/file.liq
Local prettier plugin
In general, prettier
works better when installed locally but this requires a package.json
at the
root of your project.
First, install prettier-plugin-liquidsoap
as a dev-dependency:
npm install -D prettier prettier-plugin-liquidsoap
Then add the plugin to your Prettier config:
// .prettierrc
{
"plugins": ["prettier-plugin-liquidsoap"]
}
Global prettier plugin
Installing the plugin globally works but currently requires a couple of workarounds. You need to install the plugin
and the prettier
module globally:
% npm install -g prettier prettier-plugin-liquidsoap
Next, you need to create a prettier configuration file in your home directory. This file must reference the absolute path to the plugin entrypoint:
// $HOME/.prettierrc
{
"plugins": ["/path/to/prettier-plugin-liquidsoap/src/index.js"],
"overrides": [
{
"files": "*.liq",
"options": {
"parser": "liquidsoap"
}
}
]
}
To find out the absolute path to the plugin entrypoint you can do:
% which prettier
<prefix>/bin/prettier
The plugin should then be located at: <prefix>/lib/node_modules/prettier-plugin-liquidsoap/src/index.js
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
9 months ago