From fe3259b2e9809b22432dbfd8e342ccaacb80a593 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lukas=20H=C3=A4gele?= Date: Thu, 2 Apr 2026 11:09:58 +0200 Subject: [PATCH] updated quickfix handling --- lua/config/autocommands.lua | 10 ++++++++++ lua/config/keymap.lua | 7 +------ plugin/floaterminal.lua | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/config/autocommands.lua b/lua/config/autocommands.lua index 478dd66..49afcd2 100644 --- a/lua/config/autocommands.lua +++ b/lua/config/autocommands.lua @@ -75,3 +75,13 @@ vim.api.nvim_create_autocmd({ "FileType" }, { end, }) +-- enable line breaks in quickfix list +vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = { "qf" }, + group = vim.api.nvim_create_augroup('quickfix-linebreaks', { clear = true }), + callback = function() + vim.opt_local.wrap = true + vim.opt_local.linebreak = true + end +}) + diff --git a/lua/config/keymap.lua b/lua/config/keymap.lua index 5a241bf..39206ec 100644 --- a/lua/config/keymap.lua +++ b/lua/config/keymap.lua @@ -32,12 +32,7 @@ vim.keymap.set("n", "", function() end vim.cmd("normal! zz") end) -vim.keymap.set('n', '', function() - local qf_winid = vim.fn.getqflist({ winid = 0 }).winid - local action = qf_winid > 0 and 'cclose' or 'copen' - vim.cmd('botright '..action) -end, { noremap = true, silent = true }) -- build -vim.keymap.set("n", "", "make!copen", { desc = "run makefile and open quickfix list" }) +vim.keymap.set("n", "", "makecopen", { desc = "run makefile and open quickfix list" }) diff --git a/plugin/floaterminal.lua b/plugin/floaterminal.lua index 827db46..d94671f 100644 --- a/plugin/floaterminal.lua +++ b/plugin/floaterminal.lua @@ -55,4 +55,4 @@ end -- Example usage: -- Create a floating window with default dimensions vim.api.nvim_create_user_command("Floaterminal", toggle_terminal, {}) -vim.keymap.set({ "n", "t" }, "t", toggle_terminal) +vim.keymap.set({ "n", "t" }, "", toggle_terminal) -- 2.39.5