diff --git a/lua/astronvim/autocmds.lua b/lua/astronvim/autocmds.lua index f324ad8..39b7030 100644 --- a/lua/astronvim/autocmds.lua +++ b/lua/astronvim/autocmds.lua @@ -94,9 +94,8 @@ autocmd("BufWinEnter", { desc = "Make q close help, man, quickfix, dap floats", group = augroup("q_close_windows", { clear = true }), callback = function(event) - local filetype = vim.api.nvim_get_option_value("filetype", { buf = event.buf }) local buftype = vim.api.nvim_get_option_value("buftype", { buf = event.buf }) - if buftype == "nofile" or filetype == "help" then + if vim.tbl_contains({ "help", "nofile", "quickfix" }, buftype) then vim.keymap.set("n", "q", "close", { desc = "Close window", buffer = event.buf,