blob: 0c74fe8fdbd62c3a3b7c9f2fd902eab37ee03878 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
;; Autocommands for nvim.
(module config.autocmd {autoload {nvim aniseed.nvim
env aniseed.env
a aniseed.core
: packer}})
(defn create-autocmd [event opts] (nvim.create_autocmd event opts))
(create-autocmd :FileType
{:pattern [:qf :help :man :lspinfo]
:command "nnoremap <silent> <buffer> q :close<CR>"})
(create-autocmd :TextYankPost
{:callback (lambda []
(vim.highlight.on_yank {:timeout 200}))})
(create-autocmd :BufWinEnter {:command "setlocal formatoptions-=cro"})
(create-autocmd :FileType {:pattern :qf :command "set nobuflisted"})
(create-autocmd :FileType {:pattern [:gitcommit :markdown]
:command "setlocal wrap"})
(create-autocmd :FileType
{:pattern [:NeogitStatus
:NeogitCommitMessage
:NeogitNotification
:NeogitCommitView]
:command "setlocal spell!"})
(create-autocmd :TermOpen
{:pattern ["term://*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))})
(create-autocmd :FileType
{:pattern :netrw
:command "nmap <silent> <buffer> h -^ | nmap <silent> <buffer> l <cr>"})
|