diff options
Diffstat (limited to 'articles/2023/prettier-when-it-works.html')
| -rwxr-xr-x | articles/2023/prettier-when-it-works.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/articles/2023/prettier-when-it-works.html b/articles/2023/prettier-when-it-works.html new file mode 100755 index 0000000..8e0c196 --- /dev/null +++ b/articles/2023/prettier-when-it-works.html @@ -0,0 +1,50 @@ +<!doctype html> +<html lang="EN"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="stylesheet" href="/style.css" /> + <title>Bloggings</title> + </head> + <body> + <header> + <h1>Bloggings</h1> + <a href="/index.php">Back</a> + <hr /> + </header> + + <main> +<article> +<h2>Prettier when it works</h2> + <h3>24-08-2023</h3> + <img src="/images/prettier.jpg" /> + <p>Prettier is a great code beautifier for PHP, once you get it to work.</p> + + <h3>Update 14 may 2025</h3> + <p>For Archlinux:</p> + <code>pacman -S prettier +yay -S prettier-plugin-php</code> + <p>edit ~/.prettierrc</p> + <pre> +{ + "plugins": ["/usr/lib/node_modules/@prettier/plugin-php/src/index.mjs"] +} + </pre> + <p>In order to use it in the Micro text editor, download micro-prettier:</p> + <pre> + git clone https://github.com/claromes/micro-prettier.git + cd micro-prettier + make + </pre> + <p>If you would rather not have it running on every save, in micro:<br> + Ctrl+e > set prettier.onsave false</p> + </article> +</main> +<footer> + + <p> </p> + <hr /> + <p>ยง</p> + </footer> +</body> +</html> |
