From 548f19ccc3018aa563d25cf99a9ce70a56b115fe Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sun, 5 Jan 2025 09:51:51 -0800 Subject: feat(health): close checkhealth buffers with q #31870 --- runtime/lua/vim/health.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index 3e831371b8..ebad000c5b 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -408,6 +408,15 @@ function M._check(mods, plugin_names) vim.cmd.redraw() vim.print('') + -- Quit with 'q' inside healthcheck buffers. + vim.api.nvim_buf_set_keymap( + bufnr, + 'n', + 'q', + 'q', + { silent = true, noremap = true, nowait = true } + ) + -- Once we're done writing checks, set nomodifiable. vim.bo[bufnr].modifiable = false end -- cgit