Skip to content

Commit

Permalink
tweak LSP.
Browse files Browse the repository at this point in the history
  • Loading branch information
gzagatti committed Nov 3, 2022
1 parent 4e4c7f5 commit 8e9de2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,10 @@ require'packer'.startup {function (use)
'<cmd>lua diagnostic_toggle(0)<cr>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gL',
'<cmd>lua vim.diagnostic.open_float()<cr>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gn',
'<cmd>lua vim.diagnostic.goto_next()<cr>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gp',
'<cmd>lua vim.diagnostic.goto_prev()<cr>', opts)

-- documentation help
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD',
Expand All @@ -748,7 +752,7 @@ require'packer'.startup {function (use)
'<cmd>lua vim.lsp.buf.code_action()<cr>', opts)

-- variable management
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gn',
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn',
'<cmd>lua vim.lsp.buf.rename()<cr>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr',
'<cmd>lua vim.lsp.buf.references()<cr>', opts)
Expand Down

0 comments on commit 8e9de2f

Please sign in to comment.