diff options
Diffstat (limited to 'fnl/config')
-rw-r--r-- | fnl/config/init.fnl | 1 | ||||
-rw-r--r-- | fnl/config/trim.fnl | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index 3ccff7d..7299f0b 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -20,4 +20,5 @@ _ config.treesitter _ config.which-key _ config.zen + _ config.trim _ config.lsp}}) 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/" + ] +})) |