Disable qf.lua's active configuration (we'll still use it to toggle the list) and add an autocmd that closes quickfix if it's the last window

This commit is contained in:
Kevin MacMartin 2024-04-17 15:49:34 -04:00
parent 44fe1e622f
commit 272074255a
2 changed files with 3 additions and 39 deletions

View file

@ -64,4 +64,7 @@ autocmd FileChangedRO * nested set noreadonly
"disable the whitespace plugin for mail
autocmd BufEnter,FileType mail hi ExtraWhitespace ctermbg=NONE guibg=NONE
"close the quickfix if it's the last window
autocmd WinEnter * if winnr("$") == 1 && &buftype == "quickfix"|q|endif
"}}}

View file

@ -1,39 +0,0 @@
require("qf").setup {
-- Location list configuration
l = {
auto_close = true, -- Automatically close location/quickfix list if empty
auto_follow = 'prev', -- Follow current entry, possible values: prev,next,nearest, or false to disable
auto_follow_limit = 8, -- Do not follow if entry is further away than x lines
follow_slow = true, -- Only follow on CursorHold
auto_open = false, -- Automatically open list on QuickFixCmdPost
auto_resize = true, -- Auto resize and shrink location list if less than `max_height`
max_height = 12, -- Maximum height of location/quickfix list
min_height = 5, -- Minimum height of location/quickfix list
wide = true, -- Open list at the very bottom of the screen, stretching the whole width.
number = false, -- Show line numbers in list
relativenumber = false, -- Show relative line numbers in list
unfocus_close = false, -- Close list when window loses focus
focus_open = false, -- Auto open list on window focus if it contains items
},
-- Quickfix list configuration
c = {
auto_close = true, -- Automatically close location/quickfix list if empty
auto_follow = 'prev', -- Follow current entry, possible values: prev,next,nearest, or false to disable
auto_follow_limit = 8, -- Do not follow if entry is further away than x lines
follow_slow = true, -- Only follow on CursorHold
auto_open = false, -- Automatically open list on QuickFixCmdPost
auto_resize = true, -- Auto resize and shrink location list if less than `max_height`
max_height = 12, -- Maximum height of location/quickfix list
min_height = 5, -- Minimum height of location/quickfix list
wide = true, -- Open list at the very bottom of the screen, stretching the whole width.
number = false, -- Show line numbers in list
relativenumber = false, -- Show relative line numbers in list
unfocus_close = false, -- Close list when window loses focus
focus_open = false, -- Auto open list on window focus if it contains items
},
close_other = false, -- Close location list when quickfix list opens
pretty = false, -- Pretty print quickfix lists
silent = true, -- Suppress messages like "(1 of 3): *line content*" on jump
}