diff options
Diffstat (limited to 'fnl/config/autocmd.fnl')
-rw-r--r-- | fnl/config/autocmd.fnl | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/fnl/config/autocmd.fnl b/fnl/config/autocmd.fnl index 017792f..e05405d 100644 --- a/fnl/config/autocmd.fnl +++ b/fnl/config/autocmd.fnl @@ -1,5 +1,8 @@ ;; Autocommands for nvim. -(module config.autocmd {autoload {nvim aniseed.nvim a aniseed.core : util}}) +(module config.autocmd {autoload {nvim aniseed.nvim + env aniseed.env + a aniseed.core + : packer}}) (defn create-autocmd [event opts] (nvim.create_autocmd event opts)) @@ -15,16 +18,26 @@ (create-autocmd :FileType {:pattern :qf :command "set nobuflisted"}) -(create-autocmd :FileType {:pattern :lir - :callback (fn [] - (tset vim.opt_local :number false) - (tset vim.opt_local :relativenumber - false))}) - (create-autocmd :FileType {:pattern [:gitcommit :markdown] :command "setlocal wrap"}) -(create-autocmd :FileType {:pattern [:gitcommit :markdown :org :plaintex] - :command "setlocal spell"}) +(create-autocmd :FileType + {:pattern [:NeogitStatus + :NeogitCommitMessage + :NeogitNotification + :NeogitCommitView + :ToggleTerm] + :command "setlocal spell!"}) (create-autocmd :VimResized {:command "tabdo wincmd ="}) + +(create-autocmd :BufWritePost + {:pattern :*.fnl + :callback (lambda [] + (env.init nvim.g.aniseed#env))}) + +(create-autocmd :BufWritePost + {:pattern :plugins.fnl + :callback (lambda [] + (env.init nvim.g.aniseed#env) + (packer.sync))}) |