summaryrefslogtreecommitdiff
path: root/fnl/config/autocmd.fnl
blob: 77d20c42520cdec6038115d5887efb7a42673aa0 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;; A customizable greeter.
(module config.autocmd
  {autoload {util util
             nvim aniseed.nvim
             a aniseed.core}})

(util.autocmd 
  :FileType 
  {:pattern [ :qf :help :man :lspinfo ] 
   :command "nnoremap <silent> <buffer> q :close<CR>"
   :group :_general_settings})

(util.autocmd 
  :TextYankPost 
  {:pattern [ :* ] 
  :command "silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200}"
  :group :_general_settings})

(util.autocmd 
  :BufWinEnter 
  {:pattern [ :* ] 
   :command ":set formatoptions-=cro"
   :group :_general_settings})

(util.autocmd 
  :FileType 
  {:pattern [ :qf ] 
   :command "set nobuflisted"
   :group :_general_settings})

(util.autocmd 
  :FileType 
  {:pattern [ :gitcommit ] 
   :command "setlocal wrap"
   :group :_git})

(util.autocmd 
  :FileType 
  {:pattern [ :gitcommit ] 
   :command "setlocal spell"
   :group :_git})

(util.autocmd 
  :FileType 
  {:pattern [ :markdown ] 
   :command "setlocal wrap"
   :group :_markdown})

(util.autocmd 
  :FileType 
  {:pattern [ :markdown  ] 
   :command "setlocal spell"
   :group :_markdown})

(util.autocmd 
  :VimResized 
  {:pattern [ :*  ] 
   :command "tabdo wincmd ="
   :group :_auto_resize})

(util.autocmd 
  :User 
  {:pattern [ :AlphaReady ] 
   :command "set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2"
   :group :_alpha})

(util.autocmd 
  :BufWritePost 
  {:pattern [ :plugins.fnl ] 
   :command "source <afile> | PackerSync"
   :group :packer_user_config})