aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-12-06 10:58:00 +0000
committerJuan J. Martinez <jjm@usebox.net>2022-05-29 22:57:30 +0100
commitb7bdc383f0b761d748b4eeace8c0cd8e4af4632b (patch)
treec75ee698f68b38ccb69ed2f6d3810927d914f4f5
parent1c987b6fc00a2c61db813c085bc15747ff65e27b (diff)
downloaddotnvim-b7bdc383f0b761d748b4eeace8c0cd8e4af4632b.tar.gz
dotnvim-b7bdc383f0b761d748b4eeace8c0cd8e4af4632b.zip
Diagnostic navigation
-rw-r--r--metals.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/metals.vim b/metals.vim
index 8315637..ac0ab4d 100644
--- a/metals.vim
+++ b/metals.vim
@@ -11,7 +11,11 @@ nnoremap <silent> <leader>F <cmd>lua vim.lsp.buf.formatting()<CR>
nnoremap <silent> <leader>ca <cmd>lua vim.lsp.buf.code_action()<CR>
nnoremap <silent> <leader>ws <cmd>lua require'metals'.worksheet_hover()<CR>
nnoremap <silent> <leader>a <cmd>lua require'metals'.open_all_diagnostics()<CR>
-nnoremap <silent> <space>d <cmd>lua vim.lsp.diagnostic.set_loclist()<CR>
+
+" diagnostic navigation
+nnoremap <silent> <leader>d <cmd>lua vim.diagnostic.open_float(0, {scope = "line"})<CR>
+nnoremap <silent> <leader>dn <cmd>lua vim.diagnostic.goto_next()<CR>
+nnoremap <silent> <leader>dp <cmd>lua vim.diagnostic.goto_next()<CR>
" nvim-lsp Settings
"