diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-17 01:36:07 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-17 01:36:07 +0200 |
commit | 9e654a8936ca3c8efd3f28d1987a599c2f59796d (patch) | |
tree | 791add5153a1f946f9d181645a76ba7a343fc9e3 /fnl/config/trim.fnl | |
parent | 54cbb0bee9e3ae4020ea08276f0644a410ee047b (diff) |
feat(trim): add plugin
Diffstat (limited to 'fnl/config/trim.fnl')
-rw-r--r-- | fnl/config/trim.fnl | 13 |
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/" + ] +})) |