From be7a52c6885048ed618f312070e55ab25bafb60d Mon Sep 17 00:00:00 2001 From: Jean-Pierre Appel Date: Mon, 15 Jan 2024 16:10:24 -0500 Subject: feat: bindings for quick fix, location list, and lsp diagnostics --- nvim/lua/keymap.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nvim/lua/keymap.lua') diff --git a/nvim/lua/keymap.lua b/nvim/lua/keymap.lua index 1e285c2..fbd4898 100644 --- a/nvim/lua/keymap.lua +++ b/nvim/lua/keymap.lua @@ -20,7 +20,16 @@ M.xnoremap = bind("x") M.inoremap = bind("i") M.nnoremap("gf", function() vim.cmd([[:e ]]) end) -M.nnoremap("qf", function() vim.cmd(':cope') end) +M.nnoremap("q", function() vim.cmd(':botright cope') end) +M.nnoremap("l", function() + local success, err_msg = pcall(function() + vim.cmd(':aboveleft lope') + end) + if not success then + err_msg = string.match(tostring(err_msg), "E%d+.*") + vim.api.nvim_err_writeln(err_msg) + end +end) M.nnoremap("ef", function() vim.cmd('Vexplore') end) -- cgit v1.2.3