From 3a8fb33ced1e3bf180a01abcc1ccc1024a0fa688 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 3 Nov 2025 12:21:44 +0000 Subject: [PATCH] Disable QuickFiles for now This command can be invoked with `:Q` at the moment which happens accidentally way more than I actually use this command. --- plugin/commands.lua | 56 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/plugin/commands.lua b/plugin/commands.lua index b6173a1..9301ae3 100644 --- a/plugin/commands.lua +++ b/plugin/commands.lua @@ -206,34 +206,34 @@ vim.api.nvim_create_user_command('DiagnosticToggle', function(_) vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, {}) --- :QuickFiles creates a floating window for the user to input a list of files --- then populates and opens the quickfix list. -vim.api.nvim_create_user_command('QuickFiles', function() - -- Create scratch buffer & set options - local buffer = vim.api.nvim_create_buf(false, true) - vim.bo[buffer].errorformat = "%f" +-- -- :QuickFiles creates a floating window for the user to input a list of files +-- -- then populates and opens the quickfix list. +-- vim.api.nvim_create_user_command('QuickFiles', function() +-- -- Create scratch buffer & set options +-- local buffer = vim.api.nvim_create_buf(false, true) +-- vim.bo[buffer].errorformat = "%f" - -- Calculate floating window dimensions - local ui = vim.api.nvim_list_uis()[1] - local width = math.floor(ui.width * 0.6) - local height = math.floor(ui.height * 0.4) +-- -- Calculate floating window dimensions +-- local ui = vim.api.nvim_list_uis()[1] +-- local width = math.floor(ui.width * 0.6) +-- local height = math.floor(ui.height * 0.4) - -- Create the floating window - local window = vim.api.nvim_open_win(buffer, true, { - relative = 'editor', - width = width, - height = height, - row = math.floor((ui.height - height) / 2), - col = math.floor((ui.width - width) / 2), - style = 'minimal', - border = 'rounded', - title = 'QuickFiles', - title_pos = "center", - }) +-- -- Create the floating window +-- local window = vim.api.nvim_open_win(buffer, true, { +-- relative = 'editor', +-- width = width, +-- height = height, +-- row = math.floor((ui.height - height) / 2), +-- col = math.floor((ui.width - width) / 2), +-- style = 'minimal', +-- border = 'rounded', +-- title = 'QuickFiles', +-- title_pos = "center", +-- }) - vim.keymap.set('n', 'q', function() - vim.cmd.cbuffer() - vim.api.nvim_win_close(window, true) - vim.cmd.cwindow() - end, { buffer = buffer, nowait = true, silent = true }) -end, {}) +-- vim.keymap.set('n', 'q', function() +-- vim.cmd.cbuffer() +-- vim.api.nvim_win_close(window, true) +-- vim.cmd.cwindow() +-- end, { buffer = buffer, nowait = true, silent = true }) +-- end, {})