summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-29 22:09:21 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-29 22:09:21 +0200
commit81d5ef660071fc59b80ca762f0079df662218325 (patch)
treec7dacd3fa9043f22fb80275a0b21808a87c00f38
parent380f257bf2fad773012de5302a2ce13493f60906 (diff)
Add autocmd for closing buffers with q
-rw-r--r--fnl/settings/autocmds.fnl5
1 files changed, 4 insertions, 1 deletions
diff --git a/fnl/settings/autocmds.fnl b/fnl/settings/autocmds.fnl
index b078718..f6d2584 100644
--- a/fnl/settings/autocmds.fnl
+++ b/fnl/settings/autocmds.fnl
@@ -1,6 +1,9 @@
;; Autocommands for nvim.
-(local auto-cmds [[:TextYankPost
+(local auto-cmds [[:FileType
+ {:pattern [:qf :help :man :lspinfo]
+ :command "nnoremap <silent> <buffer> q :close<CR>"}]
+ [:TextYankPost
{:callback (lambda []
(vim.highlight.on_yank {:higroup :Visual
:timeout 200}))}]