repos / dotfiles

my dotfiles

commit
e7dc2b8
parent
e7d78d0
author
Eric Bower
date
2025-11-19 23:37:28 -0500 EST
chore(nvim): toggle qf
1 files changed,  +15, -1
M dot_config/nvim/init.lua
+15, -1
 1@@ -58,7 +58,7 @@ end)
 2 map("n", "<leader>l", function() -- https://github.com/shell-pool/shpool/issues/240#issuecomment-3097566679
 3 	io.stdout:write("\027[?2048h")
 4 end, opts)
 5-map("n", "<leader>r", function()
 6+map("n", "<leader>r", function() -- toggle lsp loclist
 7 	local loclist_win = vim.fn.getloclist(0, { winid = 0 }).winid
 8 	if loclist_win > 0 then
 9 		vim.cmd("lclose")
10@@ -66,6 +66,15 @@ map("n", "<leader>r", function()
11 		vim.diagnostic.setloclist({ open = true })
12 	end
13 end, opts)
14+map("n", "<leader>q", function() -- toggle quickfix
15+  for _, win in ipairs(vim.fn.getwininfo()) do
16+		if win.quickfix == 1 then
17+			vim.cmd("cclose")
18+			return
19+		end
20+	end
21+	vim.cmd("copen")
22+end)
23 map("n", "<leader>d", ":DiffviewOpen ")
24 map("n", "<leader>a", "<cmd>15Lexp<cr>")
25 map("n", "<leader>s", "<cmd>Pick files<cr>")
26@@ -75,6 +84,11 @@ map("n", "<leader>b", "<cmd>Pick buffers<cr>")
27 local augroup = vim.api.nvim_create_augroup("erock.cfg", { clear = true })
28 local autocmd = vim.api.nvim_create_autocmd
29 autocmd("Filetype", { group = augroup, pattern = "make", command = "setlocal noexpandtab tabstop=4 shiftwidth=4" })
30+autocmd("BufEnter", { -- disable automatic newline comment continuation
31+	callback = function()
32+		o.formatoptions = vim.opt.formatoptions:remove({ "c", "r", "o" })
33+	end,
34+})
35 
36 local function setup_lsp()
37 	vim.lsp.enable({