summaryrefslogtreecommitdiff
path: root/fnl/config/autocmd.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/autocmd.fnl')
-rw-r--r--fnl/config/autocmd.fnl104
1 files changed, 55 insertions, 49 deletions
diff --git a/fnl/config/autocmd.fnl b/fnl/config/autocmd.fnl
index b6a3fe4..77d20c4 100644
--- a/fnl/config/autocmd.fnl
+++ b/fnl/config/autocmd.fnl
@@ -4,62 +4,68 @@
nvim aniseed.nvim
a aniseed.core}})
-(def- group (nvim.create_autogroup :K {:clear true}))
+(util.autocmd
+ :FileType
+ {:pattern [ :qf :help :man :lspinfo ]
+ :command "nnoremap <silent> <buffer> q :close<CR>"
+ :group :_general_settings})
-(defn- autocmd [name opts]
- (nvim.create_autocmd name (a.merge! {:group group} opts))
+(util.autocmd
+ :TextYankPost
+ {:pattern [ :* ]
+ :command "silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200}"
+ :group :_general_settings})
-(autocmd :FileType
- {:pattern [ :qf :help :man :lspinfo ]
- :command "nnoremap <silent> <buffer> q :close<CR>"
- :group :_general_settings})
+(util.autocmd
+ :BufWinEnter
+ {:pattern [ :* ]
+ :command ":set formatoptions-=cro"
+ :group :_general_settings})
-(autocmd :TextYankPost
- {:pattern [ :* ]
- :command "silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200}"
- :group :_general_settings})
+(util.autocmd
+ :FileType
+ {:pattern [ :qf ]
+ :command "set nobuflisted"
+ :group :_general_settings})
-(autocmd :BufWinEnter
- {:pattern [ :* ]
- :command ":set formatoptions-=cro"
- :group :_general_settings})
+(util.autocmd
+ :FileType
+ {:pattern [ :gitcommit ]
+ :command "setlocal wrap"
+ :group :_git})
-(autocmd :FileType
- {:pattern [ :qf ]
- :command "set nobuflisted"
- :group :_general_settings})
+(util.autocmd
+ :FileType
+ {:pattern [ :gitcommit ]
+ :command "setlocal spell"
+ :group :_git})
-(autocmd :FileType
- {:pattern [ :gitcommit ]
- :command "setlocal wrap"
- :group :_git})
+(util.autocmd
+ :FileType
+ {:pattern [ :markdown ]
+ :command "setlocal wrap"
+ :group :_markdown})
-(autocmd :FileType
- {:pattern [ :gitcommit ]
- :command "setlocal spell"
- :group :_git})
+(util.autocmd
+ :FileType
+ {:pattern [ :markdown ]
+ :command "setlocal spell"
+ :group :_markdown})
-(autocmd :FileType
- {:pattern [ :markdown ]
- :command "setlocal wrap"
- :group :_markdown})
+(util.autocmd
+ :VimResized
+ {:pattern [ :* ]
+ :command "tabdo wincmd ="
+ :group :_auto_resize})
-(autocmd :FileType
- {:pattern [ :markdown ]
- :command "setlocal spell"
- :group :_markdown})
+(util.autocmd
+ :User
+ {:pattern [ :AlphaReady ]
+ :command "set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2"
+ :group :_alpha})
-(autocmd :VimResized
- {:pattern [ :* ]
- :command "tabdo wincmd ="
- :group :_auto_resize})
-
-(autocmd :User
- {:pattern [ :AlphaReady ]
- :command "set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2"
- :group :_alpha})
-
-(autocmd :BufWritePost
- {:pattern [ :plugins.fnl ]
- :command "source <afile> | PackerSync"
- :group :packer_user_config})
+(util.autocmd
+ :BufWritePost
+ {:pattern [ :plugins.fnl ]
+ :command "source <afile> | PackerSync"
+ :group :packer_user_config})