updated quickfix handling
authorLukas Hägele <lukas.haegele93@web.de>
Thu, 2 Apr 2026 09:09:58 +0000 (11:09 +0200)
committerLukas Hägele <lukas.haegele93@web.de>
Thu, 2 Apr 2026 09:09:58 +0000 (11:09 +0200)
lua/config/autocommands.lua
lua/config/keymap.lua
plugin/floaterminal.lua

index 478dd66efb22b9c44a67775c56b2a4f55103c425..49afcd2d9a56e3b594cefe228283aee0ddbaa401 100644 (file)
@@ -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
+})
+
index 5a241bffbc7c2063417c43cda6757d9b4f9c8b1b..39206ec2990d8d23656db1a3b0b42cc07783fb3f 100644 (file)
@@ -32,12 +32,7 @@ vim.keymap.set("n", "<M-k>", function()
   end
   vim.cmd("normal! zz")
 end)
-vim.keymap.set('n', '<M-o>', 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", "<M-m>", "<cmd>make!<CR><cmd>copen<CR>", { desc = "run makefile and open quickfix list" })
+vim.keymap.set("n", "<M-m>", "<cmd>make<CR><cmd>copen<CR>", { desc = "run makefile and open quickfix list" })
 
index 827db46e44c33d1365d1cc050471a634ca4c6970..d94671fbf69171b67f4994e4c2944b920b67b898 100644 (file)
@@ -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" }, "<space>t", toggle_terminal)
+vim.keymap.set({ "n", "t" }, "<M-ö>", toggle_terminal)