repos / dotfiles

my dotfiles

commit
e7d78d0
parent
7d495b2
author
Eric Bower
date
2025-11-16 19:29:45 -0500 EST
refactor(nvim): using a picker again

quickfix is just not the right tool for a generic picker.  It is so
close to being something usable but figuring out how to get commands
into the quickfix format is meh.
1 files changed,  +8, -20
M dot_config/nvim/init.lua
+8, -20
 1@@ -34,8 +34,6 @@ o.smartcase = true
 2 o.swapfile = false
 3 o.foldmethod = "indent"
 4 o.foldlevelstart = 99
 5-o.grepprg = "rg --vimgrep --smart-case --follow"
 6-o.grepformat = "%f:%l:%c:%m"
 7 vim.g.netrw_banner = 0
 8 vim.g.netrw_cursor = 0
 9 vim.g.netrw_preview = 0
10@@ -52,7 +50,6 @@ map("n", "<C-h>", "<cmd>wincmd h<cr>", opts)
11 map("n", "<C-l>", "<cmd>wincmd l<cr>", opts)
12 map("n", "<leader>t", "<cmd>bd!<cr>", opts)
13 map("n", "<leader>f", "<cmd>term fish<cr>", opts)
14-map("n", "<leader>b", ":b ")
15 map({ "n", "v" }, "<leader>u", "<cmd>GitLink<cr>", opts)
16 map("n", "<leader>e", vim.diagnostic.open_float, opts)
17 map("n", "<leader>y", function() -- copy relative filepath to clipboard
18@@ -69,25 +66,15 @@ map("n", "<leader>r", function()
19 		vim.diagnostic.setloclist({ open = true })
20 	end
21 end, opts)
22-map("n", "<leader>q", function()
23-	require("qfutil").toggle_qf() -- toggle quickfix
24-end, opts)
25-map("n", "<leader>g", ":silent grep! ")
26 map("n", "<leader>d", ":DiffviewOpen ")
27-map("n", "<leader>s", ":Qfa fd -t f | fzf -f ") -- fuzzy match files into quickfix
28-map("n", "<leader>m", "<cmd>silent make!<cr>")
29 map("n", "<leader>a", "<cmd>15Lexp<cr>")
30+map("n", "<leader>s", "<cmd>Pick files<cr>")
31+map("n", "<leader>g", "<cmd>Pick grep_live<cr>")
32+map("n", "<leader>b", "<cmd>Pick buffers<cr>")
33 
34 local augroup = vim.api.nvim_create_augroup("erock.cfg", { clear = true })
35 local autocmd = vim.api.nvim_create_autocmd
36 autocmd("Filetype", { group = augroup, pattern = "make", command = "setlocal noexpandtab tabstop=4 shiftwidth=4" })
37-autocmd("FileType", { -- smaller window by default, with keymap to make it bigger
38-	pattern = { "qf", "loclist" },
39-	callback = function(ev)
40-		vim.cmd("resize 8")
41-		map("n", "<leader>R", "<cmd>resize 25<cr>", { buffer = ev.buf, silent = true })
42-	end,
43-})
44 
45 local function setup_lsp()
46 	vim.lsp.enable({
47@@ -126,17 +113,18 @@ vim.cmd("colorscheme default")
48 
49 vim.pack.add({
50 	"https://github.com/neovim/nvim-lspconfig",
51-	"https://github.com/tpope/vim-fugitive",
52+	"https://github.com/nvim-mini/mini.pick",
53 	"https://github.com/karb94/neoscroll.nvim",
54 	"https://github.com/linrongbin16/gitlinker.nvim",
55-	"https://github.com/neurosnap/qfutil.nvim",
56-	"https://github.com/NicolasGB/jj.nvim",
57 	"https://github.com/sindrets/diffview.nvim",
58+	"https://github.com/tpope/vim-fugitive",
59+	"https://github.com/NicolasGB/jj.nvim",
60 })
61 
62 require("vim._extui").enable({}) -- https://github.com/neovim/neovim/pull/27855
63 setup_lsp()
64 require("neoscroll").setup({ duration_multiplier = 0.3 })
65 require("gitlinker").setup()
66-require("qfutil").setup()
67 require("jj").setup()
68+require("mini.pick").setup()
69+require("diffview").setup({ use_icons = false })