summaryrefslogtreecommitdiff
path: root/fnl/settings/autocmds.fnl
diff options
context:
space:
mode:
authoraktersnurra <gustaf@gustafrydholm.xyz>2026-04-17 23:34:22 +0200
committeraktersnurra <gustaf@gustafrydholm.xyz>2026-04-18 00:50:44 +0200
commitac8edfb0db52efe65e01f73ef44133a86571ba02 (patch)
tree928d8f0d5ce0520d5acf782c4fdfd452f8f8470f /fnl/settings/autocmds.fnl
parent152fd9d787c7433cad95795992e444250cb83216 (diff)
More based fixes
Diffstat (limited to 'fnl/settings/autocmds.fnl')
-rw-r--r--fnl/settings/autocmds.fnl50
1 files changed, 24 insertions, 26 deletions
diff --git a/fnl/settings/autocmds.fnl b/fnl/settings/autocmds.fnl
index 2f0a3cd..2dd0c71 100644
--- a/fnl/settings/autocmds.fnl
+++ b/fnl/settings/autocmds.fnl
@@ -2,29 +2,27 @@
(import-macros {: autocmds} :macros)
-(autocmds
- [:FileType
- {:pattern [:qf :help :man :lspinfo]
- :command "nnoremap <silent> <buffer> q :close<CR>"}]
- [:TextYankPost
- {:callback (λ []
- (vim.highlight.on_yank {:higroup :Visual
- :timeout 200}))}]
- [:BufWinEnter {:command "setlocal formatoptions-=cro"}]
- [:FileType {:pattern :qf :command "set nobuflisted"}]
- [:FileType
- {:pattern [:gitcommit :markdown] :command "setlocal wrap"}]
- [:VimResized {:command "tabdo wincmd ="}]
- [[:FocusGained :BufEnter :CursorHold :CursorHoldI]
- {:pattern "*"
- :callback (fn []
- (when (= (vim.fn.mode) :n)
- (vim.cmd :checktime)))}]
- [[:InsertLeave :WinEnter]
- {:callback (λ []
- (let [cursorline (require :settings.cursorline)]
- cursorline.show))}]
- [[:InsertEnter :WinLeave]
- {:callback (λ []
- (let [cursorline (require :settings.cursorline)]
- cursorline.hide))}])
+(autocmds [:FileType
+ {:pattern [:qf :help :man :lspinfo]
+ :command "nnoremap <silent> <buffer> q :close<CR>"}]
+ [:TextYankPost
+ {:callback (λ []
+ (vim.highlight.on_yank {:higroup :Visual :timeout 200}))}]
+ [:BufWinEnter {:command "setlocal formatoptions-=cro"}]
+ [:FileType {:pattern :qf :command "set nobuflisted"}]
+ [:FileType
+ {:pattern [:gitcommit :markdown] :command "setlocal wrap"}]
+ [:VimResized {:command "tabdo wincmd ="}]
+ [[:FocusGained :BufEnter :CursorHold :CursorHoldI]
+ {:pattern "*"
+ :callback (fn []
+ (when (= (vim.fn.mode) :n)
+ (vim.cmd :checktime)))}]
+ [[:InsertLeave :WinEnter]
+ {:callback (λ []
+ (let [cursorline (require :settings.cursorline)]
+ cursorline.show))}]
+ [[:InsertEnter :WinLeave]
+ {:callback (λ []
+ (let [cursorline (require :settings.cursorline)]
+ cursorline.hide))}])