From d7f33143c5f21191831720fe2137f4db1c3de3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCller?= Date: Mon, 3 Jan 2022 22:20:22 +0100 Subject: [PATCH] line diagnostics is deprecated After using gl to show line diagnostics I got an error that is is deprecated. Used code from here to fix it: https://www.reddit.com/r/neovim/comments/qd3v4h/psa_vimdiagnostics_api_has_changed_a_little_bit/ --- lua/user/lsp/handlers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index fb8b7f8..a75f7e3 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -76,7 +76,7 @@ local function lsp_keymaps(bufnr) bufnr, "n", "gl", - 'lua vim.lsp.diagnostic.show_line_diagnostics({ border = "rounded" })', + 'lua vim.diagnostic.open_float(0, { border = "rounded" })', opts ) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", 'lua vim.diagnostic.goto_next({ border = "rounded" })', opts)