From 820ba36f63ed3996b895efd8608616553cfdafba Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 8 Aug 2024 09:43:23 -0400 Subject: [PATCH] feat(debugging): add `quicker.nvim` --- .../debugging/quicker-nvim/README.md | 5 +++ .../debugging/quicker-nvim/init.lua | 43 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 lua/astrocommunity/debugging/quicker-nvim/README.md create mode 100644 lua/astrocommunity/debugging/quicker-nvim/init.lua diff --git a/lua/astrocommunity/debugging/quicker-nvim/README.md b/lua/astrocommunity/debugging/quicker-nvim/README.md new file mode 100644 index 000000000..ebbe1295d --- /dev/null +++ b/lua/astrocommunity/debugging/quicker-nvim/README.md @@ -0,0 +1,5 @@ +# quicker.nvim + +Improved UI and workflow for the Neovim quickfix + +**Repository:** diff --git a/lua/astrocommunity/debugging/quicker-nvim/init.lua b/lua/astrocommunity/debugging/quicker-nvim/init.lua new file mode 100644 index 000000000..d22a5db8e --- /dev/null +++ b/lua/astrocommunity/debugging/quicker-nvim/init.lua @@ -0,0 +1,43 @@ +return { + "stevearc/quicker.nvim", + ft = "qf", + specs = { + { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + options = { + opt = { + -- allow lazy loading on quickfix opening + quickfixtextfunc = "v:lua.require'quicker.display'.quickfixtextfunc", + }, + }, + mappings = { + n = { + ["xq"] = { function() require("quicker").toggle { focus = true } end, desc = "Toggle quickfix" }, + ["xl"] = { + function() require("quicker").toggle { focus = true, loclist = true } end, + desc = "Toggle loclist", + }, + }, + }, + }, + }, + }, + ---@module "quicker" + ---@type quicker.SetupOptions + opts = { + keys = { + { + ">", + function() require("quicker").expand { before = 2, after = 2, add_to_existing = true } end, + desc = "Expand quickfix context", + }, + { + "<", + function() require("quicker").collapse() end, + desc = "Collapse quickfix context", + }, + }, + }, +}