~keving/dotfiles

f67a30c111b00d1de11876b92557123dcfa838df — Kevin Guillaumond 10 months ago dd2f991
Add shortcut to show line diagnostic in floating window
1 files changed, 2 insertions(+), 0 deletions(-)

M .config/nvim/lua/plugin_configs/nvim-lspconfig.lua
M .config/nvim/lua/plugin_configs/nvim-lspconfig.lua => .config/nvim/lua/plugin_configs/nvim-lspconfig.lua +2 -0
@@ 28,9 28,11 @@ utils.map('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
if vim.fn.has 'nvim-0.6' == 1 then
	utils.map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
	utils.map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
	utils.map('n', '<leader>df', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
else
	utils.map('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
	utils.map('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
	utils.map('n', '<leader>df', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
end
utils.map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) -- TODO still try vim docs first