diff options
| author | Jean-Pierre Appel <jeanpierre.appel01@gmail.com> | 2024-01-15 16:10:24 -0500 |
|---|---|---|
| committer | Jean-Pierre Appel <jeanpierre.appel01@gmail.com> | 2024-01-15 16:10:24 -0500 |
| commit | be7a52c6885048ed618f312070e55ab25bafb60d (patch) | |
| tree | ca5d74c59e6981ccca55c856c04719b0ef721920 /nvim/lua/keymap.lua | |
| parent | 47d61c1cb5af62cc75218661dfc7c3a0dc3378a8 (diff) | |
feat: bindings for quick fix, location list, and lsp diagnostics
Diffstat (limited to 'nvim/lua/keymap.lua')
| -rw-r--r-- | nvim/lua/keymap.lua | 11 |
1 files changed, 10 insertions, 1 deletions
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 <cfile>]]) end) -M.nnoremap("<Leader>qf", function() vim.cmd(':cope') end) +M.nnoremap("<Leader>q", function() vim.cmd(':botright cope') end) +M.nnoremap("<Leader>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("<leader>ef", function() vim.cmd('Vexplore') end) |
