summaryrefslogtreecommitdiff
path: root/fnl/config/trim.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/trim.fnl')
-rw-r--r--fnl/config/trim.fnl13
1 files changed, 13 insertions, 0 deletions
diff --git a/fnl/config/trim.fnl b/fnl/config/trim.fnl
new file mode 100644
index 0000000..156241f
--- /dev/null
+++ b/fnl/config/trim.fnl
@@ -0,0 +1,13 @@
+;; Trim whitespaces on save.
+(module config.trim {autoload {util util}})
+
+(let [trim (util.load-plugin :trim)]
+ (trim.setup {
+ :disable []
+ :patterns [
+ "%s/\s\+$//e"
+ "%s/\($\n\s*\)\+\%$//"
+ "%s/\%^\n\+//"
+ "%s/\(\n\n\)\n\+/\1/"
+ ]
+}))