From 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sun, 12 Jul 2026 11:08:50 +0200 Subject: update --- articles/2023/prettier-when-it-works.html | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 articles/2023/prettier-when-it-works.html (limited to 'articles/2023/prettier-when-it-works.html') 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 @@ + + + + + + + Bloggings + + +
+

Bloggings

+ Back +
+
+ +
+
+

Prettier when it works

+

24-08-2023

+ +

Prettier is a great code beautifier for PHP, once you get it to work.

+ +

Update 14 may 2025

+

For Archlinux:

+ pacman -S prettier +yay -S prettier-plugin-php +

edit ~/.prettierrc

+
+{ 
+   "plugins": ["/usr/lib/node_modules/@prettier/plugin-php/src/index.mjs"]
+}
+    
+

In order to use it in the Micro text editor, download micro-prettier:

+
+    git clone https://github.com/claromes/micro-prettier.git
+    cd micro-prettier
+    make
+    
+

If you would rather not have it running on every save, in micro:
+ Ctrl+e > set prettier.onsave false

+
+
+ + + -- cgit v1.3.1