diff options
| author | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-17 09:00:28 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-17 09:00:28 +0200 |
| commit | f9c022399a35558fe7f997dbeab3c26d7f955992 (patch) | |
| tree | 30dfed56d752ff779da584ab502e9a3bda952215 /fnl/config/autocmd.fnl | |
| parent | a45853f468feb2be399a587664df7f4872816b53 (diff) | |
| parent | f3432fc8f42246ac26f90146f13045377bc3899e (diff) | |
Merge branch 'master' of github.com:aktersnurra/nvim
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))}) |