aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-12-06 15:45:38 +0000
committerJuan J. Martinez <jjm@usebox.net>2022-05-29 22:57:31 +0100
commit6cee271f9bf961213622714e8ee7728c4fc4463b (patch)
tree2483c4b4982700e55910a5be3179e688c4f73b11
parentc3e9eb7e419400f301f33ba913e5eb55f046122c (diff)
downloaddotnvim-6cee271f9bf961213622714e8ee7728c4fc4463b.tar.gz
dotnvim-6cee271f9bf961213622714e8ee7728c4fc4463b.zip
Only in current buffer
-rw-r--r--metals.vim30
1 files changed, 15 insertions, 15 deletions
diff --git a/metals.vim b/metals.vim
index 253e351..73299d7 100644
--- a/metals.vim
+++ b/metals.vim
@@ -20,23 +20,23 @@ EOF
" nvim-lsp mappings for metals
"
function! MetalsMapKeys() abort
- nnoremap <silent> <C-]> <cmd>lua vim.lsp.buf.definition()<CR>
- nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
- nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>
- nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
- nnoremap <silent> gds <cmd>lua vim.lsp.buf.document_symbol()<CR>
- nnoremap <silent> gws <cmd>lua vim.lsp.buf.workspace_symbol()<CR>
- nnoremap <silent> gsh <cmd>lua vim.lsp.buf.signature_help()<CR>
- nnoremap <silent> <leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
- 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 <buffer> <C-]> <cmd>lua vim.lsp.buf.definition()<CR>
+ nnoremap <buffer> K <cmd>lua vim.lsp.buf.hover()<CR>
+ nnoremap <buffer> gi <cmd>lua vim.lsp.buf.implementation()<CR>
+ nnoremap <buffer> gr <cmd>lua vim.lsp.buf.references()<CR>
+ nnoremap <buffer> gds <cmd>lua vim.lsp.buf.document_symbol()<CR>
+ nnoremap <buffer> gws <cmd>lua vim.lsp.buf.workspace_symbol()<CR>
+ nnoremap <buffer> gsh <cmd>lua vim.lsp.buf.signature_help()<CR>
+ nnoremap <buffer> <leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
+ nnoremap <buffer> <leader>F <cmd>lua vim.lsp.buf.formatting()<CR>
+ nnoremap <buffer> <leader>ca <cmd>lua vim.lsp.buf.code_action()<CR>
+ nnoremap <buffer> <leader>ws <cmd>lua require'metals'.worksheet_hover()<CR>
+ nnoremap <buffer> <leader>a <cmd>lua require'metals'.open_all_diagnostics()<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>
+ nnoremap <buffer> <leader>d <cmd>lua vim.diagnostic.open_float(0, {scope = "line"})<CR>
+ nnoremap <buffer> <leader>dn <cmd>lua vim.diagnostic.goto_next()<CR>
+ nnoremap <buffer> <leader>dp <cmd>lua vim.diagnostic.goto_next()<CR>
endfunction
if has('nvim-0.5')