diff options
| author | Mike Vink <> | 2023-04-19 22:49:16 +0200 |
|---|---|---|
| committer | Mike Vink <> | 2023-04-19 22:49:16 +0200 |
| commit | b0d80d4f712bb0ea3d3955572b77e9e0d00f88a9 (patch) | |
| tree | 12bdf1475f6b164df7300145c7586ecb08e307a7 /fnl/conf/events.fnl | |
| parent | 12206880305f6977161d3a104334a114942e54c6 (diff) | |
start using editorconfig
Diffstat (limited to 'fnl/conf/events.fnl')
| -rw-r--r-- | fnl/conf/events.fnl | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/fnl/conf/events.fnl b/fnl/conf/events.fnl index 909eee1..67ef93d 100644 --- a/fnl/conf/events.fnl +++ b/fnl/conf/events.fnl @@ -1,37 +1,12 @@ (vim.api.nvim_create_augroup "conf#events" {:clear true}) -(let [white_space_highlight (fn [] - (local pattern "'\\s\\+$'") - (vim.cmd (.. "syn match TrailingWhitespace " - pattern)) - (vim.cmd "hi link TrailingWhitespace IncSearch")) - trim [:*.fnl - :*.rkt - :*.nix - :*.md - :*.hcl - :*.tf - :*.py - :*.cpp - :*.qml - :*.js - :*.txt - :*.json - :*.html - :*.lua - :*.yaml - :*.yml - :*.bash - :*.sh - :*.go] - white_space_trim (fn [] - (local pattern "\\s\\+$") - (vim.cmd (.. "%substitute/" pattern ://ge)))] - (vim.api.nvim_create_autocmd [:BufReadPost] - {:pattern ["*"] - :callback white_space_highlight - :group "conf#events"}) - (vim.api.nvim_create_autocmd [:BufWritePre] - {:pattern trim - :callback white_space_trim - :group "conf#events"})) +(fn white_space_highlight [] + (local pattern "'\\s\\+$'") + (vim.cmd (.. "syn match TrailingWhitespace " + pattern)) + (vim.cmd "hi link TrailingWhitespace IncSearch")) + +(vim.api.nvim_create_autocmd [:BufReadPost] + {:pattern ["*"] + :callback white_space_highlight + :group "conf#events"}) |
