From d228af7c82c755c63ac392d469d768e64d7fd9bd Mon Sep 17 00:00:00 2001 From: srdusr Date: Sat, 4 Mar 2023 07:44:30 +0200 Subject: Add quickfix to conditional mapping for 'q' --- lua/user/keys.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lua/user') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index f2ce98d..9999138 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -34,6 +34,9 @@ map('n', 'q', function() local config = vim.api.nvim_win_get_config(0) if config.relative ~= "" then -- is_floating_window? return ":close" + elseif + vim.o.buftype == 'quickfix' then + return ":close" else return "q" end -- cgit v1.2.3