diff --git a/laptop/plugin/lsp_config.lua b/laptop/plugin/lsp_config.lua index c568e0b..9fed154 100644 --- a/laptop/plugin/lsp_config.lua +++ b/laptop/plugin/lsp_config.lua @@ -22,12 +22,18 @@ lspconfig.ocamllsp.setup {} lspconfig.hls.setup {} --- Set ;k to hover and ;a to show code actions +-- ;k to hover +-- ;a to show code actions +-- ;d to show diagnostic message +-- ;n to go to next diagnostic message +-- ;N to go to previous diagnostic message vim.api.nvim_create_autocmd("LspAttach", { callback = function() map('n', 'k', vim.lsp.buf.hover, { remap = false }) map('n', 'a', vim.lsp.buf.code_action, { remap = false }) map('n', 'd', vim.diagnostic.open_float, { remap = false }) + map('n', 'n', vim.diagnostic.goto_next, { remap = false }) + map('n', 'N', vim.diagnostic.goto_prev, { remap = false }) end, }) diff --git a/server/plugin/lsp_config.lua b/server/plugin/lsp_config.lua index 2174e92..d59c484 100644 --- a/server/plugin/lsp_config.lua +++ b/server/plugin/lsp_config.lua @@ -12,10 +12,17 @@ local lspconfig = require('lspconfig') -- }, -- } --- Set ;k to hover and ;a to show code actions +-- ;k to hover +-- ;a to show code actions +-- ;d to show diagnostic message +-- ;n to go to next diagnostic message +-- ;N to go to previous diagnostic message vim.api.nvim_create_autocmd("LspAttach", { callback = function() map('n', 'k', vim.lsp.buf.hover, { remap = false }) map('n', 'a', vim.lsp.buf.code_action, { remap = false }) + map('n', 'd', vim.diagnostic.open_float, { remap = false }) + map('n', 'n', vim.diagnostic.goto_next, { remap = false }) + map('n', 'N', vim.diagnostic.goto_prev, { remap = false }) end, }) diff --git a/vps/plugin/lsp_config.lua b/vps/plugin/lsp_config.lua index 2174e92..d59c484 100644 --- a/vps/plugin/lsp_config.lua +++ b/vps/plugin/lsp_config.lua @@ -12,10 +12,17 @@ local lspconfig = require('lspconfig') -- }, -- } --- Set ;k to hover and ;a to show code actions +-- ;k to hover +-- ;a to show code actions +-- ;d to show diagnostic message +-- ;n to go to next diagnostic message +-- ;N to go to previous diagnostic message vim.api.nvim_create_autocmd("LspAttach", { callback = function() map('n', 'k', vim.lsp.buf.hover, { remap = false }) map('n', 'a', vim.lsp.buf.code_action, { remap = false }) + map('n', 'd', vim.diagnostic.open_float, { remap = false }) + map('n', 'n', vim.diagnostic.goto_next, { remap = false }) + map('n', 'N', vim.diagnostic.goto_prev, { remap = false }) end, })