From a7f320b1572572a0b1060b70834668176e36c7b1 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Mon, 14 Feb 2022 10:54:03 +0300 Subject: [PATCH] remove quickfix remaps and add more diagnostic ones --- config/nvim/lua/user/remaps.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/nvim/lua/user/remaps.lua b/config/nvim/lua/user/remaps.lua index 7d89f0e..457209d 100644 --- a/config/nvim/lua/user/remaps.lua +++ b/config/nvim/lua/user/remaps.lua @@ -29,11 +29,6 @@ vmap("J", ":m '>+1gv=gv") -- Shift+j - same as above mapping but the other w vmap("<", "", ">gv") --- Quickfix and local lists -nmap("lo", ":lopen") -- lo - open local quickfix list -nmap("ln", ":lnext") -- ln - go to next local quickfix entry -nmap("lp", ":lprev") -- lp - go to previous local quickfix entry - -- Terminal tmap("", "") -- Escape - in terminal mode, quit to normal mode nmap("Th", ":lua require('user.utils').open_terminal()") -- Shift+t - open terminal in horizontal split @@ -59,8 +54,13 @@ nmap("K", ":lua vim.lsp.buf.hover()") -- Shift+k - Show documentation in hov nmap("", ":lua vim.lsp.buf.rename()") -- F2 - Rename thing under the cursor nmap(".", ":lua vim.lsp.buf.code_action()") -- Leader+. - show code actions to run vmap(".", ":lua vim.lsp.buf.range_code_action()") -- same as above but for visual mode + +-- Diagnostics nmap("dd", ':lua vim.diagnostic.open_float(nil, {focus = false, scope = "cursor"})') -- Leader+d - show diagnostics in float window nmap("dy", ":lua require('user.utils').copy_diagnostic_message()") -- Leader+d+c - copy diagnostic message +nmap("dn", ":lua vim.diagnostic.goto_next({ float = false })") -- Leader+d+n - go to next diagnostic +nmap("dp", ":lua vim.diagnostic.goto_prev({ float = false })") -- Leader+d+p - go to previous diagnostic +nmap("do", ":lopen") -- Leader+d+o - open local quickfix list w/ diagnostics -- Git nmap("gg", ":G") -- Leader+g+g - open vim-fugitive window