From 3df0e475e83db6bdaa954876007564b9328d364d Mon Sep 17 00:00:00 2001 From: Shadman Date: Wed, 16 Jun 2021 12:21:04 +0600 Subject: [PATCH] docs(lsp): Clarify opts for show_line_diagnostics() --- runtime/doc/lsp.txt | 4 ++++ runtime/lua/vim/lsp/diagnostic.lua | 2 ++ 2 files changed, 6 insertions(+) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 55873331c0..aa95245bd0 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1547,6 +1547,10 @@ show_line_diagnostics({opts}, {bufnr}, {line_nr}, {client_id}) {opts} table Configuration table • show_header (boolean, default true): Show "Diagnostics:" header. + • Plus all the opts for + |vim.lsp.diagnostic.get_line_diagnostics()| + and |vim.lsp.util.open_floating_preview()| + can be used here. {bufnr} number The buffer number {line_nr} number The line number {client_id} number|nil the client id diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index d4580885db..e4acfd0711 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -1123,6 +1123,8 @@ end --- ---@param opts table Configuration table --- - show_header (boolean, default true): Show "Diagnostics:" header. +--- - Plus all the opts for |vim.lsp.diagnostic.get_line_diagnostics()| +--- and |vim.lsp.util.open_floating_preview()| can be used here. ---@param bufnr number The buffer number ---@param line_nr number The line number ---@param client_id number|nil the client id